1

I am sending notification mails to all the registered users in the site with an Unsubscribe link. Currently I am lopping through all users in the db and sending mail to each user. For the Unsubscribe link i am adding the user email to differentiate between each users when they click the link. Everything except the Unsubscribe link is same in the email.

Is there any way to send mail to all users at once without looping and get the Unsubscribe link for each user different, so that i can differentiate between each user when they click the link

3
  • 3
    send them to a unsubscribe page, and let them enter the e-mail address there Commented Jan 26, 2012 at 14:31
  • 1
    uff. when I get this complicated unsubscribes I just hit spam. Make the process as simple as possible for the user. Commented Jan 26, 2012 at 14:50
  • @RenePot what would stop malicious users from entering different email addresses to unsubscribe other users from that custom page? Commented Sep 2, 2024 at 9:29

2 Answers 2

3

Simply said: No

Two emails can either be identical or not - if they have different links in them, they are not. There is no mechanism to send different emails to different users in one go.

Sign up to request clarification or add additional context in comments.

Comments

1

If you use some email delivery service like SendGrid or PostageApp they offer this kind of functionality. On SendGrid they have the X-SMTPAPI Header with support for Substitutions -JSON text strings- (http://sendgrid.com/docs/API_Reference/SMTP_API), where each Substitution (a customised/dynamic piece of text) value corresponds to an email in the “To” section of the JSON string.

With this you can post once the email to the delivery service together with the receiver list and your customised fields -like names or unsubscribe links- and the delivery service will take care of merging and sending the emails to all the receivers.

This approach will save a lot of bandwidth and processing time the more you use it. If you don't send many emails these email delivery services offer limited free accounts.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.