Hi all,
first of all, im new here, i dont have alot of php experience but im learning.
Im building a site and im using php mailer to send a email.
im planning on using a remote mailserver.
but when i try to send a mail i get this error (using $mail->SMTPDebug = 2:
SMTP -> ERROR: RCPT not accepted from server: 550 5.7.1 Unable to relay for myemail@gmail.com SMTP -> FROM SERVER: 250 2.0.0 Resetting Message was not sent
This error only comes up when i send email to adresses outside the domain, internal mail works.
i tried checking if my username and password was right by using telnet. and it matched. so that cant be the problem. my phpmailer code is as following:
$mail=new PHPMailer();
$mail->SMTPDebug = 2;
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Host = 'IP of host';
$mail->Port = 25;
$mail->SMTPAuth = true;
$mail->Username = 'username';
$mail->Password = 'password';
$mail->From = 'username@domain.nl';
$mail->FromName = 'webmaster';
$mail->AddAddress($Email,"");
$mail->AddReplyTo('username@domain.nl',"username");
$mail->Subject = $subject;
$mail->Body = $body;
$mail->WordWrap = 50; // set word wrap
if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
does anyone know what might couse this problem?
does something prevent connection (couse maccafee is blocking port 25),
or is it a right issue and do i lack rights?
or is it something else.
Thank you for your time.