oceans Posted December 7, 2008 Share Posted December 7, 2008 Dear People, I could not send automated email via phpmailer in my php page. (i) It is working fine in my wamp server. (ii) It was working fine with my earlier server space provider for a year or so. (iii) In fact, it was working fine with my current server space provider as well. I did not did any amendment to my pages, I strongly believe it is not due to my page due to the above reason, I think it could be due to “.htaccess”. Can any one help me please, thanks. Quote Link to comment Share on other sites More sharing options...
corbin Posted December 7, 2008 Share Posted December 7, 2008 What error do you get? Quote Link to comment Share on other sites More sharing options...
oceans Posted December 8, 2008 Author Share Posted December 8, 2008 no error, simply the returned value for the function call is not ONE. Quote Link to comment Share on other sites More sharing options...
trq Posted December 8, 2008 Share Posted December 8, 2008 You might want to post some code or something, were not exactly mind readers. Quote Link to comment Share on other sites More sharing options...
oceans Posted December 9, 2008 Author Share Posted December 9, 2008 ini_set("include_path", "../CSS/phpmailer"); require("class.phpmailer.php"); error_reporting(0); /*Send Email*/ $EmailingTo = $InputFromScreen[2]; $EmailingSubject=$InputFromScreen[1]; $EmailingMessage=""; $mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->Host = $EmailingSMTP; // SMTP servers $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = $EmailingUsername; // SMTP username $mail->Password = $EmailingPassword; // SMTP password $mail->From = $EmailingFrom; $mail->FromName = $EmailingFromName; //$mail->AddAddress("josh@site.com","Josh Adams"); $mail->AddAddress($EmailingTo); // optional name //$mail->AddReplyTo("info@site.com","Information"); $mail->WordWrap = 50; // set word wrap //$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); $mail->IsHTML(true); // send as HTML $mail->Subject = $EmailingSubject; $mail->Body = $EmailingMessage; $mail->AltBody = ""; if(!$mail->Send()) { //echo "Mailer Error: " . $mail->ErrorInfo; echo "Email Not Sent!"; $InputFromScreen[1]=""; } else { echo "Thank You"; } if(!$mail->Send())------ I am not getting ONE here, I am not getting any error message either (could it be error messages are turned off, if so how can I turn on). Quote Link to comment Share on other sites More sharing options...
oceans Posted December 9, 2008 Author Share Posted December 9, 2008 Any one want to comment on this, please. Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted December 9, 2008 Share Posted December 9, 2008 make sure your path to this file is right: require("class.phpmailer.php"); So make sure that is the correct path to that file Quote Link to comment Share on other sites More sharing options...
oceans Posted December 11, 2008 Author Share Posted December 11, 2008 Does any one know how to send email using the following code if(@mail('aaa@aaa.com','Form values',$sen)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.