In a NodeJs app I'm using Mandrill to send email reminders to people signed up to different kind of events. Every five minutes the app check for ready reminders and send these. The number or reminders can vary from zero to many at every check.
But here comes the problems:
If for example 3 ready reminder are found at a certain check, and two of these have the same recipient (same email), but different merge_vars because they are about different events. When sent only one (the first found?) set of merge_vars will be used to both of these recipients.
So, how do I keep unique merge_vars even to multiple recipients with the same email? I guess i could split duplicated email adresses into several different calls. But I would really like to do one call, and send one array of recipients. Is it possible?
At this time, Mandrill uses email addresses as a unique identifier for merge vars in API calls, so it's only possible to provide one set of merge values for an email address, even if you've specified that address multiple times in the messages.to parameter. If you have multiple unique emails to send to the same recipient, that should be handled in separate API calls at this time.
I found an easier workaround than multiple API calls, and confirmed it works. Append a unique identifier to each email address using the "+" symbol. Then multiple emails to the same person will technically be to different email addresses, so Mandrill's merge fields will work correctly. e.g.
example+event1#example.com
example+event2#example.com
example+event3#example.com
All three of these will be delivered with the correct merging to example#example.com, and the recipient can even filter by the exact addresses if they wish when searching for the messages later.
(I am having the same issue now in 2019, so assume the original problem hasn't been fixed on Mandrill.)
Edit: The above method will not work with #yahoo.com recipients, as they don't support sub-addressing. The emails will bounce as if the address doesn't exist. (I consider that a problem with Yahoo, not the answer, since it's standard. But anyway, if you are emailing a group with a lot of yahoos... erm, yahoo.com emails I mean, then this method won't help.)
Related
Is there a way to detect if an email sent via Mandrill has been forwarded by the recipient to someone else?
The email will contain links (click tracking can be on). I'm wondering if somehow if the recipient of the forwarded email clicks any of the links that it could be used as an indicator that the email was forwarded.
Or perhaps some other approach?
There is not a way.
Unless that same message you sent gets forwarded from recipient 1 --> recipient 2 --> back to you (you would check headers), there is not a way. In order for this to even be an option, whoever your recipient uses as an email server/client, would have to be built with this functionality.
- Below is merely added to show a very limited potential to track emails being forwarded.
You could potentially reference an embedded image on the internet (something you can track), AND* if the "forwarded recipient" allows images to be viewed, you MAY* be able to see the IP's that have accessed your image you referenced in the email.
AND* = Image viewing is rarely ever enabled. User has to allow this to happen on a per-email basis.
MAY* = Now you run into the hassle of trying to understand your recipients network and if many people share public IP's (think home networks or small businesses, cheaper for internet provide to assign one IP to house/building)
You would THEN have to go into the hassle of tracking down an IP to a person.
As i know it is not posible to track normal forwarded e-mails. I mean mails that are forwarded with the "forward" button of the mail client.
I've seen some times an "Click here to forward" button in news letters. When you click on that button you go to an web page where you can put the mail address of the recipient. When you click on the send button an exact coppy of the newsletter is send to the mail addres which is typed in the textbox. With this method you can track the forwards.
The problem is that not everyone uses this method (so uses the default forward button). To trigger people to use your button you can give them something special (discount or credits where they can get something with). A second thing is that you need to put the button on the top of your mail for the best result.
If it is posible with Mandrill i cant tell you but i read in this topic the Mandrill support is good so maybe you can mail them. You need to do an fund first so you can get use the support but they can tell you if it is posible and how.
Link to Mandrill support page
Though I haven't used it, I believe it is possible with Merge Tags. Refer the below
The MailChimp *|FORWARD|* merge tag generates a link to an online form where recipients can share your email with others. Because Mandrill emails are generated and tracked individually, a web version isn't provided automatically.
More details can be found here
I am working on PHP project that should fetch emails from IMAP server, and store them in local database.
Same IMAP server can be used by other email clients, like outbox and so on.
The problem is how to know which messages I already fetched, and which I didn't? I am thinking to use search by datetime, but is it reliable(I would have cronjob, that would access user mail box every minute, and check for emails, but not sure if datetime can cause some issues, for example in case when at almost same time arrive short message and message with big attachment).
I was thinking about system tags, but user can modify them via email client, so I can rely on them, and don't want to modify them and confuse client.
Next I was thinking about custom tags, but not all IMAP servers support them(and our software need to be flexible as much as possible).
Any good idea how I could solve this problem?
Keep track of the currently highest synced UID of the folder you are syncing, and verify that the UIDVALIDITY value of the folder match.
Unique identifiers are assigned in a strictly ascending fashion in the mailbox; as each message is added to the mailbox it is assigned a higher UID than the message(s) which were added previously. Unlike message sequence numbers, unique identifiers are not necessarily contiguous.
I have enabled email to Ticket feature of JIRA and any message sent to abc#company.com becomes an issue.
This is working as expected.
But there are times when I get several junk tickets from a single email address. I guess it creates separate tickets for each line in that mail. I do not know how a single message can create hundreds of tickets in Jira. Is there any way to stop it? Is it possible to filter out junk emails? I do not want to restrict it to the domain of company.com
We put a postfix server in front of JIRA together with a spam filter (there are a couple available)
if this doesn't suffice, you might
receive messages into an 'inbox' project.
when processing the messages you move it to the right project if appropriate.
I have a blogging application. Once a blog-post is created by a user, it will be sent as an email to some of user's friends. I want a functionality where the friends will just reply to the email and the content of the email will go as comments for that particular blog-post.
One way to do this is to do something similar to what http://ohlife.com does. It basically creates a unique ID per user per day, has the reply-to attribute of the email set to post+{unique_id}#ohlife.com and probably parses this field to know which user is the email for, when it gets received. But it really has only 1 email address which is post#ohlife.com. The part after the "+" get's ignored by email servers. This also is applicable to gmail.
What I wanted to know, is whether this property is for particular email servers or is it universal? If it is not universal, is there is email server independent way of implementing this? I would not want this to be based on the email subject, as it's the trivial solution I know of.
it is depending on your mail server and how it is configured.. (although it is quite a standard) - for example in postfix:
recipient_delimiter = +
you could set it to anything you like .. i once configured it to be a dot so i can use it all over the web.. http://www.postfix.org/postconf.5.html#recipient_delimiter
but you could simply make it configurable in your application as well..
Besides using the email subject or address, one other easy way to accomplish this would be to just stick an identifier number at the bottom of the outgoing email's body. It would then come back to you in the quoted part of the response message. This is much less obtrusive than putting stuff in the subject or address, and if you're using HTML messages you can even make the code invisible.
We are working on an online food ordering application. When the user orders something from any restaurant, an email is sent to the restaurant's email address mentioning the order details. However, our client wants that an order print out should be generated automatically as soon as a new order is received.
Is it feasible using ROR? If not, any alternate solution to the problem?
When my group wrote something like this we went a little lower tech, and had the system generate a fax and send it to a fax machine at the restaurant. Of course, that's mainly because this was a system working across many restaurants, with disparate IT infrastructures, and the one thing they had in common was each had a fax machine.
I would figure this could be done in 1 of two ways:
1- Outlook event-- Outlook has the ability to set up 'rules', one of which I think allows printing.
2- Create a script that runs every few minutes, checks the email (either through IMAP, or POP, depending on the account), and prints all of them out.
See this: http://ruby.about.com/od/tasks/a/pop3.htm for info on how to check POP3 mail with ruby on rails.
For printing, the links mentioned here seem useful: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/504a616bf3e28057/ff6cb91462dfe961?pli=1
Ensure that you have 'from' or 'subject' filters setup, otherwise there will be a lot of spam printing.
You can use software to print your order automatically when email is received, it supports also print attachment like pdf, word, etc...
It is used by a lot of restaurant to print online order:
http://www.automatic-email-manager.com/