0
votes

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<[email protected]");

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

?>

and it prints

mail is sent :-)

What i am missing here ?

2
The SMTP server's authentication requirements will be particular to its configuration. You should speak to your host provider's support team to understand what their requirements are. - eggyal
They give me the host address with the port (587) and i added my email account from the cpanel, after that i send them this message they said you have to check SMF forum for this issue, Those SMTP info is correct - Besher

2 Answers

0
votes

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.

0
votes

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