Send tons of email by message queue - message-queue

I have 1 million addresses in table, and 1 function to send mail to all.
The scenario i thought is make 1 task to select all 1 million emails then send one by one OR split into smaller tasks to (such as 2 tasks with 500k emails for each).
But how i manage the log when it is fail when sent to some emails.
I don't any mail module to support. I just want to know the logic.
Edit: not only email but my app also have our notification system, do it in same way for email.

Use a legitimate bulk mail service like SendGrid.com, MailGun, etc.
If you use your own web hosted server it probably can't handle the traffic and has a good chance of ending up blacklisted so all outgoing mail will be blocked.

Related

Salesforce Marketing Cloud mass email send

I want help from someone regarding the mass email send via Salesforce Marketing Cloud.
For example, I want to send emails to 5000 customers daily. It is a newsletter. Each days the email contents will change. There are 4 dynamic variables in my newsletter. First Name, Last Name, Email and Message.
Which is the option to send mass emails via Salesforce Marketing Cloud?
There are different options like use Data Extension, List, Triggered Send. I used triggered send (I am using PHP fuelSDK ) and it is not sending all the 5000 emails quickly (when I created a triggered send I have selected Email, List, etc). I am calling the Triggered send api 5000 times to send to each emails (It is taking more than 1.30 hours to complete). Also it is not sending email to all the 5000 email addresses. Some failure response I am getting like "Error Code: 24 - Subscriber was excluded by List Detective". I understand this. Some emails I can see "Successfully sent" response in the log. But when I check it in tracking section, those emails are not there. I don't know what is happening here.
Can any one help me to understand the problem?

How to send bulk mails using Mandrill in Drupal 7

I have an email to be sent to nearly 30,000 users. For this I have installed and configured the Mandrill module for Drupal 7, but I don't know how to start sending emails to my list. Do I need to install any other module?
From Mandrill's help:
Lists cannot be uploaded or stored in Mandrill. Recipient or subscriber lists should be managed in your own database or application. Then, when you're reading to send an email, recipient information is passed to Mandrill in your API request or SMTP message.
Note: If you're looking for a service that provides list-management services as well as the ability to create and track bulk emails, check out MailChimp.
Import your list of 30k emails to a table in your database.
Make another table called sent_emails, where it stores a string for sql, a text column for the html in the email, another text column for a text email, a string column for a subject, the date and time you want the emails to be sent
Cron up a bash script that runs every minute and checks for records in the sent_emails table and if so sends the email to the specified list of user ids that gets generated from the sql
Yes as #datashaman said, email lists cannot be imported into Mandrill or any other SMTP email gateways like SendGrid, Amazon SES, MailGun, etc.
But you can use 3rd party email clients or email marketing applications, like Sendy to easily integrate Mandrill. You can check Sendy installation services like, easysendy, which can get all these done for you.
Using Sendy you can manage the list of email subscribers and send emails through the SMTP gateways of your choice.

Amazon SES sending duplicate emails

I have switched to using Amazon SES to send our transactional alerts from our asp.net system and I'm getting calls that people are receiving duplicate emails.
I have confirmed that our program is only sending the email once to each user.
I received one of these duplicates exactly 5 minutes after the first email was sent, making me think it is some sort of retry issue.
Is there a way to configure/fix this issue?
If it makes any difference, I am using the AWS SDK in asp.net and calling the AmazonSimpleEmailServiceClient.SendEmail call.
Amazon assigns a unique message ID to every email sent. Look in the full headers of the emails you received for an ID like the following:
0000012fea2d8375-85e23920-10cf-4d1b-b237-5dc13847b66c-000000#email.amazonses.com
If it is the same in both emails you got, then there is some sort of glitch between Amazon and the receiving SMTP server that is causing it to be resent. If the ID is different between the 2 emails, then you are sending it twice.

browsers mailto issue?

i have an application that has to return emails to a user with his email client, but in some cases I have to pass around 1000 emails.
I'm using mailto on href, something like this:
mailto:info#useremail.com?bcc=email1#test.com,email2#other.net,anotherone#dfsf...
Why am I returning to his email client instead using PHP mail() function?
Because the user sender email depends on which computer he is using, and he needs to archive thoose emails.
The problem:
Some browsers, if the email list is bigger than X, it won't send to his preferred email client.
You could output the full BCC list and ask the user to copy-paste it in. But maybe you should just rethink your entire strategy if you want to pass thousands of e-mail addresses to a user.
That's because the length of a GET request (and such a link is a GET request) has a maximum. On some browsers it might only be 2083 characters. So any email address behind that limit will not be send to the client email program. And thousand of email adresses will break the limit.
For anything other than a simple mailto:address with no parameters, mailto: URLs are massively unreliable and should be avoided. URL-length issues are only the beginning.
on some cases i have to pass around 1000 emails...
Even if a mailer could cope with getting the URL, a user's residential ISP is unlikely even to allow them to send that.
Give up. Send the mails yourself from PHP. Send a copy to the user for the archival purposes.
Passing a user thousands of email addresses is very unusual.
Generally, a more typical application would use PHP mail() on the server side, and then allow browsing the archives of whatever notifications have been sent out. The mail stays on and is sent from the web server, but allows the user to see what's gone out in the past.
On the minus side, that's a good bit more code, but probably the only way to fix the problem you're having; mailto: wasn't meant for large volume.

Sending emails through SMTP and testing

I've got a PHP app with an invitation system where users can invite other users to try the service. Internally we use google apps for our domain to send/receive emails (mydomain.com).
1) My question is, can I send emails from my server with the from address being invite#mydomain.com? I am worried about the emails being blocked/ignored by the destination server. I am aware that it is possible to send the emails by configuring my php installation to use google smtp server, but there is a limit of 500 emails a day, which is not very scalable.
I don't really know that much about sending emails and why/how they are blocked/considered spam. I'd appreciate any good advice/tips you can give me.
2) What is a good way to test to see if the email portion of my app is working without installing it on my live server. Can I just setup an smtp server on my desktop and send mails this way? Can you recommend any other good ideas for testing. I'll basically be sending just a few emails to my personal webmail accounts to make sure that everything works.
Thanks,
Bill
1) My question is, can I send emails
from my server with the from address
being invite#mydomain.com? I am
worried about the emails being
blocked/ignored by the destination
server. I am aware that it is possible
to send the emails by configuring my
php installation to use google smtp
server, but there is a limit of 500
emails a day, which is not very
scalable.
I don't really know that much about
sending emails and why/how they are
blocked/considered spam. I'd
appreciate any good advice/tips you
can give me.
There is a way track if mail has been bounced (there are more than 10 possible bounce reasons!). You can set the return-path header in your outgoing emails. Best practice is to specify a different mail address in the return-path. When e-mails are getting bounced for whatever reason, a notification will be sent to this address. Additionally you can have for example a (PHP) cron job that connects using IMAP to the bounced email account and do something with the bounced e-mails. This is a pretty reliable way to track the status of your sent emails.
Additionally, in order to minimize the chance your e-mail will get blacklisted you could think about signing your e-mails using a certificate (you can get one for free for personal usage. A commercial one may cost you around 25 dollars a year)
2) What is a good way to test to see
if the email portion of my app is
working without installing it on my
live server. Can I just setup an smtp
server on my desktop and send mails
this way? Can you recommend any other
good ideas for testing. I'll basically
be sending just a few emails to my
personal webmail accounts to make sure
that everything works.
You can actually send a test email from everywhere as long as the outgoing SMTP port (25) is not blocked. If you have an own smtp server with username/passwd authentication enabled, you will be able to send e-mails from everywhere using the these credentials/settings. In all other cases, you will have to use the smtp of your internet provider to send emails.
To address the second part (as Eric pointed out, you'll have better luck at serverfault.com with the first part), any locally hosted SMTP server should be able to do the trick, and there are plenty available for any given OS. Google can help you there.
The main thing you'll want from a local SMTP server is detailed logging. It's entirely possible that the local server could fail/refuse to deliver the message to its intended destination for any number of reasons (again, serverfault.com), but that's outside the scope of testing the code's delivery of the email to the SMTP server.
If it does properly forward the test message to you, great. But if it doesn't, you just want to be able to see in the server's logs that it received the message correctly and was able to process it. Whatever that processing accomplished is a separate issue.
For email testing I use Pappercut. It's easy to use but some antivirus may not like you opening port 25.
I use Dumbster for testing. I will catch the emails, then my test code can check the content.
To avoid spam, there are a number of things you have to do, and I'm not sure I've found them all. Make sure that your IP is registered, and that a reverse lookup returns the right domain.
1) Sending:
This is a good article describing some of the pitfalls around sending email http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html
Check out the comments too.
2) Testing:
Disclaimer - I work for the company behind the service linked to below.
If you would rather not set up your own smtp server you can use a hosted email testing service like Clickity
You can create as many test email addresses as you like or configure your app to point directly at our smtp server. You can then view the complete email on our site as part of your manual testing or automate the tests it via our API.