PHPMailer apparently not all messages coming through

I’m sure I read somewhere that Gmail might put some limitations on large numbers of emails being sent, but it’s only a nagging thought, not something I’ve done myself.

Re the account credentials (I was going to quote, but I can’t select the appropriate bit of text for some reason), could the client not just set up a new Gmail account for this purpose and let you have those details, or you put it in a config screen somewhere so you can test it with yours, then he can use his own without requiring a code change, just a config change.

I would expect that if you use a mail server like Gmail, the credentials you use will need to match the email account that you are using as your “from” address so you’ll have to send them from that Gmail address - I would doubt that Google would be happy to send emails as if they are from info@my-website.com, isn’t that what Open Relay is?

2 Likes

I would recommend using a mailer service like Mailgun or Amazon SES.

They keep track of bounces etc for you, so you don’t have to do it. You can then also use these logs to tell your client what happened.

Additionally, most of these services set up SPF and DKIM for you, decreasing the chances that the sent email will be seen as spam. SPF is quite easy to set up yourself if you wanted to, but DKIM is a royal PITA.

Most of these services are also dirt cheap by the way. With Mailgun you even get the first 10,000 messages each month for free.

1 Like

For sure I will have a look at these services. Thanks

Client wishes he receive that many emails :slight_smile:

@rpkamp. Do you have any experience with one of those two. Which one would you suggest?

I have experience with both and I don’t have a strong preference for either of them in terms of tracking or day-to-day workings.

Mailgun has a nicer UI though.

1 Like

Are you checking that the PHPmailer send method is returning true or are you just ignoring the return value?
Are you invoking it in a try, catch block to trap exceptions.
Is your database access done in a try, catch block.
Are you having it send you a message when an exception occurs.

Are you sending more than one email at a time which along with database queries can cause your script to time out.
And are you trapping and reporting all errors?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.