Best way to relay emails in PHP ?

Hi Experts,

Our application deployed on two LINUX virtual machines in Azure. And the application needs to send emails out in some events in it's work flow.

So, the app using PHP standard mailer (actually it's a combination of YiiMailer, SiwftMailer) and we are trying to use Microsoft O365 email account to relay these emails. So far we didn't able to work this out.

What are the other recommended methods for sending emails out ? without going emails SPAM or JUNK at any cost.
 
Thanks for your time !
Shakthi777Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
without going emails SPAM or JUNK at any cost.
That is not at all your choice.  Users, the email recipients, get to choose what is considered spam or junk in their email client.  In fact, the 'legal' definition of spam in the US is 'unwanted email'.  It says nothing about the content, only that the recipient considers it 'unwanted'.

I would suggest PHPMailer which is the most common program after the PHP 'mail()' command.  Except that you are trying to send thru a Microsoft email server and they do not like emails from PHP web sites.  I have tried for years to make that work.  I can send from an email account thru PHP on the web server and then send the same email thru a standard email client and the PHP email will disappear or bounce if you are lucky and the 'regular' email thru a 'regular email client will go thru without problems.
0
Shakthi777Author Commented:
Thanks for the comment, and what would be the recommended email relay software ? Postfix ?
0
Dave BaldwinFixer of ProblemsCommented:
Postfix or Sendmail would work for most email addresses.  You will always have trouble with Microsoft mail servers like Hotmail or Microsoft O365.  I found that I could send to them by using PHPMailer to connect to a 'standard' email account and send email that way.  The problem then became that a lot of web servers block the ports used for sending email.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shakthi777Author Commented:
thanks !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.