im developing a website which sends alot of emails (registration, forgot password, transaction, etc..) and currently i'm using PHPMailer and gmail's SMTP to send them. They work pretty good and i never had a lost email.
So what is wrong?
Well, since it has to login to the SMTP and such it takes longer to load the page. For example when a user makes a transaction it takes about 900-1000ms longer to finish the request. I balieve that sending emails like this is a very bad idea.
What to do?
I never had to send mails this way so i dont know which is the fastest practise.
I was thinking to write a little python or php cli service which has a queue with emails to send. When an email must get delivered it will take care of it.
Not sure if this is perfect. An suggestions?