I have a Mercury SMTP server running on localhost (announcing as right now.

Unfortunately, I am unable to send emails from it to GMail.

I tested sending an email to myself using localhost and PHP, and viewed the result in Outlook.

I received both an email and an error message that the email could not be sent.

In Mercury, the only settings I have changed are add the working user to the user-list and set up the SMTP server to announce as (My from is set to @ Port is 25.

I'm using SwiftMailer to connect (and I know the code works because I could connect to my GMail account).

When I paste the errors with

if (!$mailer->send($message, $failures))
          echo "Failures:";

I get something like Failures:Array( [0]=>'@gmail.com')

What could be the issue? Thanks!


Got the answer, I had to change SMTP settings to allow outgoing mails.

Here is where I got the answer for anyone else having the same problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.