3

Please, help! Can't send mail using Mercury, also mail() function in php doesn't work. The setups are here.

I've been looking though various guides, tryed different setups in Mercury, but nothing worked.

My php.ini file setup is the following:

SMTP = localhost
smtp_port = 25
sendmail_from =postmaster@localhost

My senmail.ini:

smtp_server=localhost
smtp_port=25
error_logfile=error.log
debug_logfile=debug.log

My Mercury setup:

enter image description here

When i try to send a letter (File-Send mail message) i get a mistake : enter image description here

As a result, my php-script which uses mail() function also doesn't work (though the function returns True, there is no letter in my gmail account).

Community
  • 1
  • 1
parsecer
  • 4,758
  • 13
  • 71
  • 140

2 Answers2

2

Have you looked at the gmail settings? Allowed Insecure App in the setting to use gmail SMTP is required to send mail using gmail address. Disable two factor auth. Use server address as smtp.gmail.com, port as 587.

quasar
  • 404
  • 6
  • 17
-1

to fix this you need to use your computer ip, port forward the port 25 and 110. Then you need to go to the php.ini and click ctrl f and then search: mail function.

Then change that ip to your local computer ip. You can find this by typing ip config. Then you need to type that ip where it asks for mail server.

Then you need to put send mail from as local email account you've created in mercury. The email account need to look something like: (username@computerip).

Then you will save the file and go to the dirrectory: C:\xampp\sendmail and then click sendmail.ini and do the same thing as you did in php.ini accept it will be at the top of the file. Then save the file. Also in mercury, check the setting send relay non local mail.

After that you should be able to use the php mail() function and send php email's. That's it you shouldn't have any more problems. Make sure to remove your current config and then do this.

BreyndotEchse
  • 2,192
  • 14
  • 20
  • 1
    Consider formatting your answer so that people can have a look at it. It's unreadable in it's current form. – kk. Jan 22 '21 at 21:12