How to implement email correlation with subject and body modification? - email

I have a system that sends mail.
I have a system that receives mail.
I need to identify that a received mail correlates with the one the other system sent.
The particular thing here is that either the subject or the body can be modified.
I thought on putting some hash in the header of the sent email, but I don't know where this could be added
Don't you have any clue?

As you did not supply enough detail for a language specific answer, I will explain the general approach.
You can add a custom header to your outbound email, using x-vendor-header style for the header (start with x- to mark it as an extension, then vendor- for your company and end with the header name. The can be a unique identifier for the email message.
You can look for this header in your inbound process to identify the message.

I've finally found the solution:
Most email's servers support to put something after the username using '+' as separator. So I can encrypt some id and decrypt it when is replied looking on the from address.
example:
neuquino+encryptedID123421234#gmail.com
I hope this can help someone else with the same problem

Related

Send an email I want it isn't received

:)
I searched for any solution but I found nothing. I'd send an email like as follows:
To: Recipient1#domain.com CC: Recipient2#domain.com
but I'd want that Recipient1 does NOT receive the email, while Recipient2 does. In this way, Recipient2 thinks I sent the email also to Recipient1 but, actually, Recipient1 received nothing.
Is it possible?
Thank you very much.
Try adding special characters to the first email address, like a non breaking space, or a similar looking character from another character set, you may find a way to generate a failing address while not really displaying it!
I know it works that way with URL and some spam e-mails...

Links have random characters prepended in email

I am using the current link in my email.
*|baseUrl|*/verifyEmail?token=*|token|*
This however causes one or two people to get strange links from the email and get not found, usually based on some random email providers. E.g. - if I use a 10 minute mail (10minutemail.com), I get the following:
https://10minutemail.com/10MinuteMail/www.mywebsite.com/verifyEmail?token=b32fee82da59e7b4085269faca35ec7025122876
Correct link: www.mywebsite.com/verifyEmail?token=b32fee82da59e7b4085269faca35ec7025122876
Assuming this is due to baseUrl? Am I doing something fundamentally wrong when setting up my email link?
You need to include http:// or https:// with your baseUrl. Otherwise the email client may prepend a default base address instead of 'just' the missing protocol, especially if it is a webmail client.

Emails sent through joomla go to SPAM folder

I am using the latest Joomla build for my website.
Allso we use a DNS record for having the mail delivered to our own server instead of the server on which the website is hosted.
I have used several contact form components, but every sent mail goes to my SPAM folder.
After searching hours on the web (and getting linked to this site frequently) i decided to make a new post.
It does not matter if i use the standard joomla forms, or any component.
Whenever a user fills in a form on my website, the email gets sent. The user receives a copy of its message, and i receive the message of the user. However, this message gets thrown in the spam folder, as phishing.
The sender of the mail always is: username#nameserver.i3d.net; namens; websitename
What do i have to change/enable/disable for this to work?
Thanks in advance.
Patrick.
(Sorry, I'm new to Joomla, but it uses PHP, so this may apply. Also this answer got a little long...)
It might be an issue with the email headers. A lot of email clients will automatically spam-box all mail where the address in the From: header doesn't match the envelope sender. As an analogy, you might not trust a snail-mail letter signed "Your Rich Uncle", mailed in an envelope with a Nigerian return address. Also if your envelope sender has a different domain than the one the email is actually sent from, that's another quick ticket to the junk bin. For more info about Gmail's message blocking policies (and general good practices), you can try this help page.
Here's some basic PHP email-sending code:
$to = $userEmailAddress;
$subj = $emailSubject;
$mesg = $emailMessage;
$headers = implode("\r\n",array(
"MIME-Version: 1.0"
,"Content-type: text/html;charset=iso-8859-1"
,"From: WEB_ADMIN_NICE_NAME <WEB_ADMIN#YOURSERVER.COM>" // *** 'From:' header
));
$from = "-fWEB_ADMIN#YOURSERVER.COM"; // *** envelope sender
if(!mail($to, $subj, $text, $headers, $from)){
//Some error handling...
}
On the first line I commented, you'll want to replace WEB_ADMIN_NICE_NAME with the name you want the email recipient to see (e.g. "Bill Gates"), and on both lines, replace WEB_ADMIN#YOURSERVER.COM with the actual return address (e.g. "da_boss#microsoft.com"). Note: whatever address you choose for the return address is where users' replies will be sent.
To reiterate, make sure both lines have the same return address (though the nice name can be anything you like), and make sure that the actual server sending the mail is in fact located at YOURSERVER.COM.
Lastly, I'm not sure where Joomla does its mailing, but if you're totally lost, you can try grepping with -lr for 'mail[[:space:]]*('.
there are several reasons that could make your email look suspicious to spam filters; to find out which head on to:
http://www.mail-tester.com
grab the email address and send an email from your website to it.
Then go back to the page and it will tell you what's wrong.
btw I'm struggling with the same issue,my problem being that on Joomla 2.5.9 apparently when you send html emails, a text-only copy is not added to the message, which is considered "spammish behaviour"
The problem is the i3d.net email address. My personal experience is that their network (31.204.154.0 - 31.204.155.255) is a significant source of spam and they do not action abuse reports. I suggest changing your hosting company.

How to get email address from MFMailComposeViewController

Application is sending email by using MFMailComposeViewController, everything works just fine. However after sending email, the recipient address needs to be stored for further processing. As far as I can tell, there is no API for this.
How do I get the email address where message was sent to?
Should I subclass MFMailComposeViewController and override something? What would that be?
Could I find email address by looking at MFMailComposeViewController view hierarchy? What would I be looking for there?
Any other ideas?
Figured out a partial answer, here's the details:
http://jomnius.blogspot.com/2011/02/how-to-find-mfmailcomposeviewcontroller.html
Problems: it finds the recipient email address(es), but only if that fits in about 35 character text string. Otherwise you find only a summary string like "aaa#aaa.aa & 2 more...". So where are the actual email addresses in this case?
As an alternate UI flow -- though obviously I don't know your app, so only you'll know whether this can work -- you could instead have the user enter recipient info into a textfield and then push the mail composition viewcontroller (with the recipient(s) pre-filled).
You could even use a variation of Joe Michel's Multi-Recipient Picker library to make it feel more like the native recipient selection.

Embed indentifier within an Email

I am trying to embed an ID into an email so that when a recipient replies to an email that my system sends out, my system can pick it up and match the two together.
I have tried appending a custom header, however this is stripped out when the user replies.
I have tried embedding an HTML comment within the email, but outlook does not seem to keep comments when a reply email is created.
Worst case scenario, I can manually try and match the sent and received emails by time span or have a visible tag within the message body.
Does anyone know of a more elegant solution?
Thanks in advance
Email messages already contain such an identifiers, called Message-ID. And there's even a way to send which message you're replying to by sending that ID in a header called In-Reply-To. That's done by pretty much all email clients, that's how they usually do their threading.
It's defined in RFC 822 (yep that's pretty old) and probably re-defined and refined in more modern versions of that.
I have seen a method that includes a one byte image with a unique name that's linked to the user. When they view the email and download the images, your HTTP server will record a hit for that unique image. Of course the user needs to display images, but you can include a message in the body asking them to display the images. We actually include content in an image so they need to show images.
If your incoming e-mail can handle +foo or -foo suffixes, use that.
Many e-mail systems can route user+foo#example.com or user-foo#example.com
to user#example.com. You can replace foo with some kind of identifier.
Several mailing list servers use this for tracking bounces.
While I can't say for certain, my investigation in that sort of matter some time ago yielded the following "conclusion":
Headers are transformed a lot
Message bodies are transformed a lot
This is partly because, I suspect, of:
Need to protect users from malicious intentions
Need to perform "targeted marketing"
I have seen "unique codes" flying around in clear text in the email body but I would suggest having a unique identifier embedded in the return address instead.
The usual approach is to place the id in the subject line and/or somewhere visible in the message text and informing the recipient that he should not modify the subject or quote the original mail when responding.