|
In the php.ini file, have you uncommented
extension=php_openssl.dll
This you can try
require("PHPMailer/class.phpmailer.php");
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = 'ssl://smtp.gmail.com:465';
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'username@gmail.com';
$mailer->Password = 'yourpassword';
$mailer->From = 'from@gmail.com';
$mailer->FromName = 'namefrom';
$mailer->Body = "your message";
$mailer->Subject = "subjectname";
$mailer->AddAddress(joeblogs@fredsmith.com);
if(!$mailer->Send()) {
error_log("Mailer : error ".$mailer->ErrorInfo)." : $to";
echo "fail";
}
else {
echo "sent";
}
modified 1-Aug-19 21:02pm.
|
|
|
|
|
I've uncommented extension=php_openssl.dll and the message is "fail", is there another alternative error so this script can't send email?
Thank you,
|
|
|
|
|
|
What do you think?
Ok, basically doesn't matter, it works anyway but I like to have my HTTP verbs used the right way.
Since ever I've been using GET to handle all the data pulling actions. So everytime I need to pull data from the server I use a GET, everytime I push data to the server I use a POST.
Yesterday I had this discussion with a guy that argued that search operations (like an AJAX request that implements a grid filtering mechanism) must be a POST because it doesn't return a resource... (I really couldn't understand this answer... I tried to but it was impossible to make him explain to me what it meant by that in other words)
Search operations, for me, naturally fit in the data pulling logic. Although it may be filtered data, and we may need to pass a bunch of filter options to the server, the operation itself is to retrieve data from the server.
What do you think?
|
|
|
|
|
AlexCode wrote: What do you think?
I think it depends on the circumstance and environment. I love to be able to bookmark a parameterized url, always more efficient than having to navigate to the page from the homepage.
OTOH, I can imagine some people wanting to keep their search-terms private. Check out the history of your browser, and you'll see what I mean.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
On your answer you actually give me one more reason why a search should be a GET (for bookmarking).
Although this is not the case, is for internal ajax requests handling, but the same concept still applies.
The only circonstance I can imagine using a POST instead of a GET on this is it the data to be passed to the server is such that there's a chance of overloading the URL max size standards. Otherwise, its a GET!!!
Thanks!
|
|
|
|
|
You're welcome
|
|
|
|
|
|
I've got a table whose row color alternates between light gray and default (white). This looks fine in my browser, but when I preview or print the page, no gray shows up. Any particular reason?
<HTML>
<TABLE BORDER="1">
<TR STYLE="BACKGROUND-COLOR:LIGHTGRAY">
<TD>Row1,Col1</TD>
<TD>Row1,Col2</TD>
</TR>
<TR>
<TD>Row2,Col1</TD>
<TD>Row2,Col2</TD>
</TR>
<TR STYLE="BACKGROUND-COLOR:LIGHTGRAY">
<TD>Row3,Col1</TD>
<TD>Row3,Col2</TD>
</TR>
</TABLE>
</HTML>
Thanks.
- DC
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Not a real answer, but a bit more info. I saved your source and looked at it with Chrome21 and FF15. In print preview, FF gets it right but Chrome behaves as you describe.
Me, I'd be tempted to use CSS rather than inline styling. Then you can use media-specific stuff to control screen and print styling independently.
[edit]Did the research I should have done before posting. I looked at one of my sites where I have alternate divs styled background-color:#EEEEEE and it's the same - browser views and FF print preview good, Chrome print preview broken.
So it looks to not be related to where the style is set. But again, I haven't got any @media print styling on that page.[/edit]
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Peter_in_2780 wrote: Me, I'd be tempted to use CSS rather than inline styling. I had already tried both. Same result.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Browsers are sometimes set to not print background colors (to save on ink, I guess).
|
|
|
|
|
Changing that setting solved it. Thanks.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
|
Dear all,
I'm new comer in development web with jquery. I've problem when I developed my web using jquery. My case is I use two ajax in one jquery that defined in file A. In file A there are dropdown menu and button. the first ajax is triggered when dropdown menu is changed. And then ajax call html from file B. so html in file A replaced by html from file, and now the button coming from html in file B. Dropdown menu html isn't replaced by html from file B, after that I clicked that button, but ajax not triggered. Does anyone have problem with me? Please help me for this matter...
Thank you very much,
Regards
Reinhart
|
|
|
|
|
chandra reinhart wrote: Does anyone have problem with me?
Do you want problem? then open your error console. In firefox use ctrl+Shift+j, in chrome use the same. then see what error it is showing and let us know.
This Signature Panel is available for advertisement.
How to contact: go outside and yell my name.
p.s. If I don't reply, then your offer is not tempting
|
|
|
|
|
Hi rashid..
Thank for your response.. Last night I tried to solve my problem, it happened because I use button from another file so indirectly I have removed the ajax function for that button..
Regards,
|
|
|
|
|
I want to publish my web on my pc with IIS7 but I am getting error message after publish for "access denied to folder"
how can I debug this problem?
Please suggest me.
|
|
|
|
|
we have started a very new company.
and got some customer as well for website development.
Now I am confused, from where to buy hosting space.
my requirements are [PHP , MySql, Html, Javascript, CSS]
Local hosting will be good or internet websites.
Where I will not face any user complain.
and how much it will cast in average?
|
|
|
|
|
Start here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I'm asking about hosting server not professionals
|
|
|
|
|
Sourav Sarkar-SS wrote:
I'm asking about hosting server not
professionals
You're going to have to explain that: makes no sense.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Hi,
I have a button on a HTML page.
If i click that button I have to invoke "OpenFile" dialog.
Could any one assist please.
|
|
|
|
|
Use:
<input type="file" id="fileDialog" />
This would give you browse button on click of which Open File dialog would appear.
|
|
|
|
|