cant able to send mail in wamp.

April 13, 2011 at 22:44:08
Specs: Windows 7
Hi,

Am trying to send email confimation link to the email provided. But am getting the following error

mail() [function.mail]: SMTP server response: 554 5.7.1 <myname@mydomain.com>: Sender address rejected:

Please help me .


See More: cant able to send mail in wamp.

Report •


#1
April 13, 2011 at 23:36:31
Are you using your own SMTP server or an external one? If you are using an external server then the mail is being rejected because you are trying to use the server as a relay.

Report •

#2
April 13, 2011 at 23:55:07
Hi,

Thanks for your Reply

But am still having some problem in sending the mail. I am using the following code for smtp config.

$mail = new PHPMailer();


$mail->SMTPAuth = true;
$mail->SMTPKeepAlive = true;
$mail->Host = "ssl://smtp.gmail.com";
$mail->Port = "465";
$mail->Username = "myname@gmail.com";
$mail->Password = "password";

$mail->AddAddress($to);
$mail->Subject = $subject;
$mail->MsgHTML($content);

Also am using PHPMailer to for sending mails

Am getting this error
"Could not instantiate mail function" .

can you please give me some solution for this


Report •

#3
April 14, 2011 at 02:43:44
Hi,
Thanks for your Reply
But am still having some problem in sending the mail. I am using the following code for smtp config.
$mail = new PHPMailer();

$mail->SMTPAuth = true;
$mail->SMTPKeepAlive = true;
$mail->Host = "ssl://smtp.gmail.com";
$mail->Port = "465";
$mail->Username = "myname@gmail.com";
$mail->Password = "password";
$mail->AddAddress($to);
$mail->Subject = $subject;
$mail->MsgHTML($content);
Also am using PHPMailer to for sending mails
Am getting this error
"Could not instantiate mail function" .
can you please give me some solution for this


Report •

Related Solutions

#4
April 14, 2011 at 03:59:18
I believe that the server name should just be "smtp.gmail.com". If you want to use SSL try adding the line:

$mail->SMTPSecure = 'ssl';


Report •

Ask Question