Question

My forum has a problem with sending emails : i have configured my mail settings as the following :

Mail Type : smtp SMTP Host : myhost Port : 587 Username & password : a valid email account on my domain

when i click on forget password to test sending emails i got the following message in error log:

Sender address is not valid for your login. Check your email program settings

I am pretty sure that this account is correct, and i tried to add test mail script to my host with the following code :

<?php

$mail = mail("myEmail", "wahahahahahaahahahahaa","I like spamming your inbox!!!", "From: Myself<your_email@here.com");

if(!$mail){
    echo 'mail is not sent!';
} else {
    echo 'mail is sent :-)';
}

?>

and it prints

mail is sent :-)

What i am missing here ?

Était-ce utile?

La solution 2

Problem Solved. I added my gmail on webmaster email, i changed it to domain email user then the problem is solved

Autres conseils

I agree with Eggyal - it sounds like the hosted SMTP server is not allowing mail to be sent from the MAIL FROM address that you are using, with the authentication credentials that you are using.

To confirm this, and to rule-out a problem with the way that your application is trying to send the message - you might want to try sending a message through this SMTP server using a standard mail client (such as Thunderbird or Outlook), and using the same MAIL FROM address and authentication credentials that your application is using. If this fails with the same error, then you've confirmed that the hosted SMTP server is not allowing mail to be sent from the MAIL FROM address that you are using, with the authentication credentials that you are using.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top