Nodejs receiving email and redirecting to gmail email address - node.js

So i have an website, abc.com. If someone sends an email at support#abc.com i want to receive it at gmail address or whatever address i chose. Then if i reply to that email it in gmail then it should send either using gmail or mandrill. And from of the email should show up as support#abc.com.
This is my first time tackling email. And i have no clue.
So far i understand i need something to take emails in, send emails out, and then there is smtp server.
I get that nodemailer fulfils the role needed by two of the first things..But rest is confusing.
I know this sounds vague but as front end jquery dev i never thought of this much. So be patient and understand like with http protocol i have not much of understanding on this. This question could be many questions however i don't know what those question need to be.

Related

[Linux][mutt]How to improve email "trustworthyness"

So, I run an online service where people can sign up using their email address. It's as basic as it can get. Put in your address, receive email with confirmation link.
For that I've set up mutt on Debian 11 which I'm using to send a HTML-EMail with an attachment.
For some reason, mail providers like googlemail and outlook filter those mails out. Sometimes they appear in peoples inbox, sometimes in spam and sometimes they don't get them at all. My googlemail UI shows me that it "couldn't verifiy if this email came from DOMAIN or from a spammer".
Does anyone here know what I can do to resolve this problem?
Any advice is appreciated.

Get time of last sent email to certain contact with Gmail API

I read a lot of documentation on Gmail API, but couldn't find anything about this, so I'm wondering if someone knows some way to do this?
I need to check the date of the last time I've sent an email to a certain email address.
I found out there is this resource:
https://developers.google.com/gmail/api/v1/reference/users/messages/list#request
and using filter like "to:certainusersemail#example.com" for q parameter would bring all sent emails which I can sort by time.

SMTP Client - Send hidden information that can come back in a reply

I am using the nodemailer SMTP node module, a simple way to send emails through SMTP.
I am using this to send out text messages to various cell carriers, which will allow you to send a text message for free via email. An example email, which will text the Sprint phone (310) 987-6543:
3109876543#messaging.sprintpcs.com
These are all going out through one SMTP email address. This means all text replies from someone's phone will channel back to my email address.
A lot of people send these texts. I want to route the reply text back to the right person, using my own server side code.
The problem is distinguishing where the text came from. Ideally I could hide my own primary key ID for the sender in some sort of SMTP header, which would arrive at the recipients phone and come straight back in their text reply.
I don't really know anything about SMTP or email protocols - is this possible?
edit
As given in each of the answers below, in better email servers you can address to an email address as well as an extension to that address, such as:
// original email
sms-service#mysite.com
// extension
sms-service+a6e1087b#mysite.com
This would be a correct answer and would solve my problem, if only this worked in Exchange Server, which is the email server I am using. I don't know if there is a way to enable this or any other workaround.
Exchange server doesn't support plus addressing natively but it is possible do achieve this with a custom MTA, e.g. http://durdle.com/regexcatchall/
Source: https://serverfault.com/questions/195276/does-exchange-support-plussed-users-e-g-mynamespamexample-com-or-a-similar
Here are a few approaches that you might be able to use:
Unique from addresses
You could you use unique "from" or "reply-to" address for each each message (or for each recipient). For example "sms-service+a6e1087b#mysite.com". In that example, the hex would be a unique identifier that can be mapped to the conversation in your database.
Gmail supports such a scheme: emails targeted to [foo]+[whatever]#gmail.com will be delivered to [foo]#gmail.com and the receiver will know also get the [whatever] back. (more on this http://lifehacker.com/144397/instant-disposable-gmail-addresses)
Identify the user, not the conversation
One option is to not identify the conversation, but identify the phone number the reply comes back from instead. In many cases, the number from where the SMS reply was sent back from is enough to connect that message to the conversation. I'm sure the SMS gateway you're using will provide you with the number from where the reply came from.
Commercial SMS gateway
You can also opt to use a commercial SMS gateway (smsglobal.com comes to mind, though there are many others). These services have well defined APIs for sending a receiving replies. This naturally comes at a price, though. But along with the price, you do get more confidence as to the reliability of the service. A free SMS gateway might get shut down without much warning.
This common problem is traditionally implemented using the semantics of From: and Reply-To: headers of e-mails. This is in fact not (directly) related to SMTP, but rather to ARPA network text messages.
RFC 5322 is the current specification of these messages. It states:
When the "Reply-To:" field is present, it indicates the address(es) to which the author of the message suggests that replies be sent. In the absence of the "Reply-To:" field, replies SHOULD by default be sent to the mailbox(es) specified in the "From:" field unless otherwise specified by the person composing the reply.
So you simply need to encode the information you need into the Reply-To: header. Since you mention your own server-side code, you might be running an SMTP server yourself. In this case, you can put any address that will be routed to your SMTP server and encode the right person's address there.
Alternatively, if you rely on another SMTP server, you might want to use aliases. Postfix, and mail services such as GMail, typically allow address extensions, i.e. addresses of the form user+foo#domain.com, and you can encode the necessary information in the address extension.
For example, let's say that alice#domain.com wants to send a text to Sprint phone (310) 987-6543 through your service, you could send an e-mail to 3109876543#messaging.sprintpcs.com with:
Reply-To: alice%40domain.com#yourservice.com
Alternatively:
Reply-To: yourservice+alice%40domain.com#gmail.com
This will allow you to route the reply properly by looking at the destination of the reply e-mail.

How to prevent emails from a specific address going to Hotmail SPAM?

I have a site on a dedicated server with it's own IP range that has been running for a good few years. We have a notification email address (mailout#domain.com) which we use to send automated emails (activation emails when a user signs up and notification emails if something relevant to them happens, eg someone befriends them or comments on their picture etc). Users can select whether to receive these notifications or not. We have SPF and RDNS setup.
Email from all our other email accounts go to hotmail/gmail/yahoo mail etc correctly into the inbox. However any mail sent from the mailout#domain.com account (whether automatically by the server or manually via outlook) is delivered correctly to the inboxes for yahoo and gmail however goes into Junk in Hotmail (but other #domain.com addresses deliver to hotmail's inbox correctly). It says at the top of the message that MS Smartscreen marked this message as junk. I signed up for MS Smart Network Data Services to monitor the IP and it says it's not blocked but it displays Bot-like behaviour (which kind of makes sense as our notifications are kind of bot like even though they're not spam).
I can't work out what to do to prevent this from happening, we've authenticated the email, there's obviously not a general block on the IP as emails from different accounts on the same domain are going through successfully. It doesn't seem to be the format of the email either because if I send identical emails from mailout#domain.com and contact#domain then the one from contact# gets through to the inbox but the one from mailout# goes through to junk.
I can't really work out what to do and obviously trying to get MS to sort it out is never going to happen and i've used all their available tools. I can obviously try setting up a new email address (eg noreply#domain.com) and using that for notifications but i assume it will only be a matter of time before that gets blocked as well.
I would be immensely grateful for any suggestions anyone has!
Thanks so much,
Dave
You don't have many options. Try to do as many of the following as you can:
Reach out to MS support (don't discard this notion)
Implement DKIM and possibly DMARC (which are vastly more informative than SPF)
Change your IP address to something cleaner
Find and follow bulk sender best practices, e.g. M³AAWG's BCPs, perhaps the Help – I'm on a Blocklist doc

Monotouch: any ideas why sending mail is sporadic?

This is the code: d59516457">http://monobin.com/_d59516457
These are the results when using Debug|iPhone (Debug|Simulator works fine):
When the "From" is set to GMail, I can only send to a GMail account.
When the "From" is set to my ISP, I can send to myself (at the ISP) and GMail, but NOT to another of my email addresses not connected to the ISP. (it's to an address for one of my websites, which is then forwarded to my ISP).
Any ideas why this is so flakey? I thought at first it was the ISP, but now I'm not so sure.. is there a way to "trace" any of hops?
I'm concerned that if I submit it to the app store, a user will have the same problem as this, and I don't want a bad rep for the app. On the other hand, because it works, sometime and not others, maybe I could hope it's my phone?
if you want you can use http://testflightapp.com/ so you get some beta testers doing Ad-Hoc releases of your app (you choose who you want to invite), if you want so I can send you an invite I would be more than glad to help you to test your app :) email me if you want the invite, my email its on my profile
About the solution, you can check if you have a webmail based interface that you can view on your computer, the email that you sent from the iPhone must be on the sent items folder, if the email and the attachment are there you can be sure that your application is delivering correctly you email to the SMTP server so the problem resides somewhere else...
Also make sure your that your smtp server is not blacklisted as a SPAM server even more if your smtp server relies on shared enviroment like Hostgator shared plans etc
Alex

Resources