cfmail, google mail and reply to - coldfusion

I am having problems with google mail with a coldfusion webform, when the form gets sent the reply address is always myemail#myemail.com (substituted). Is this a google mail thing or is there a fix?
<cfmail
from = "#email#"
To = "myemail#myemail.com"
failto="#email#"
server="smtp.gmail.com"
replyto="#email#"
port="465"
useSSL="true"
username="myemail#myemail.com"
password="*****"
Subject = "Confirmation Form"
>
<cfmailparam name="Reply-To" value="#email#">

I don't believe Google Mail allows you to send mail from an address not tied to the account.
I would suggest, regardless of the SMTP server you use, using a real address tied to that domain for the "from" attribute. Set the reply-to and on-behalf-of (I think I got that right) headers to the email of the person "sending" the message.
I will give you one warning about sending lots of automated mail through Google. I was working on a project, and was told to use Google mail to send out a large amount of email. After about a day, they stopped sending out any mail on that account.... but accepted the mail. That is, their SMTP server told CF that the mail had been accepted, then trashed it instead of sending. I'd strongly suggest running your own SMTP server if you send more than a couple dozen emails a day.

I can't remember about personal accounts, but sending mail through Google Apps definitely allows customized Reply To, and this works with replyto attribute of cfmail -- without cfmailparam. Possibly it is the way to handle this problem.

Related

How to setup an email address for sending only?

My main goal is to setup an email address for my server to use for sending emails only.
I did some research, and it looked like Amazon Simple Email Server and/or Amazon Workmail could provide me with what I needed. I've gotten as far as setting up SES and Workmail so that I can set my server to be able to send emails. However, I saw that once the Workmail inbox is full (50GB), the account would be unable to send emails. Given that this is going to be used by the server and not a human, I didn't want the inbox to get filled with auto replies, spam, or failed to send messages, and then be unable to send emails. So, I went looking for a way to either:
A) prevent emails from being received and stored in the inbox
B) a rule I could setup to delete anything that didn't match the company domain
C) be able to read the inbox and delete email messages using the AWS CLI, and I'd setup my own script to manage how and what was deleted when
So far I haven't had any luck.
Again, I'm not particular how I achieve the goal, but I do preferably need to find a way to have an email address for a server to use exclusively for sending messages. I worry that if I leave it to employees to remember to login and clear the inbox, someone will forget, and then the server will stop sending emails.
Any direction or advice would be greatly appreciated.
I'm not well versed in email protocols; could I setup the address to return a bounce back always, and that would prevent it from receiving emails into it's inbox?
How are you generating these emails? If you are generating them programmatically (via an app/script), you may not need to set up a server. If you just route the outgoing mail through your app to SNS, the emails will be valid, however, there will be no "inbox" for incoming mail and they will just be dumped. This way you don't have to actually worry about an inbox getting full as it will just drop anything coming in.
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html
In order to receive emails though SNS, you have to go through the setup linked above, but if you do not set this up, then emails will just bounce. At least, that is how I have been doing it.

Sendy External SMTP Bounce Handler

Sendy will not track bounced email address when sending emails via any SMTP server. It only works when if you hook it with AWS SES.
As I'm using SMTP which is hosted on a Linux server along with IMAP, POP3.
I sent thousands of mail using that SMTP and Sendy is not counting Bounced addresses while I checked my mailbox and there was thousands of undelivered mail.
Is there any way to make it count for Sendy SMTP?
I saw this image in Google, Don't know how to make it.
The image you found does not appear to be part of Sendy -- it appears to be from this third party product. It's not entirely clear.
What it seems to do is connect to your mailbox (the one you showed, with the bounces) using the POP3 mail fetching protocol... and read those bounce messages.
The web site seems to imply that this vendor wants access to your server and will install their products for you, which seems like a very dubious practice, so proceed with caution.

Does my From address need to exist for Amazon SES

I own a domain - for the purpose of this question, let's call it example.com.
I have verified example.com with Amazon SES. I have set up the DKIM stuff as well. Everything is working; I have no problems sending outgoing emails, and I have already been granted production access.
The question: I am sending emails from no-reply#example.com, but this email address does not actually exist. Should I be worried about this? Is it bad to send emails from an email address that does not actually exist? Since I verified the domain, it seems that I can send emails from any email address I choose to invent.
(My emails are 'email validation' emails. We do not wish to capture any form of reply from our users, and bounces would only occur due to users registering fake email addresses - despite our warning that it is pointless to do so.)
I searched everywhere for an answer to this question, and I'm very surprised that I haven't found an explicitly clear answer to it...
What you are doing is very common, with SES and/or any other batch mailing type service where you don't want any replies to the sending address - I don't see any problem.

How do I send email from a user's email address with Django?

I'd like to send email to third parties on behalf of users. The key is for the user's email to show up as the "from:" email.
I've tried using send_mail with the user's email as the from_email, but to no avail. When I used gmail's servers to send the message, the third party sees the EMAIL_HOST_USER as the "from:" email. And when I tried using namecheap's mail server, I got SMTPRecipientsRefused: {u'<to email>': (553, '5.7.1 <from email>: Sender address rejected: not owned by user <EMAIL_HOST_USER>')}.
If possible, I'd like to avoid asking for their password as well.
Short answer: You can't do that.
Back in the old days, mail servers used to be quite relaxed about posting mail whenever anyone asked them to, but then SPAM happened and people realised that it was actually quite important to check that the person sending an email is actually the person whose address appears in the From: header.
There are now several mechanisms in place that make it very difficult to spoof a sender email address. These include:
Sender Policy Framework (SPF): An email validation system that works by placing restrictions on the IP addresses authorised to send email from a particular email address. If you try sending email from an IP address not associated with the legitimate owner of an email address, your mail will be rejected.
DomainKeys Identified Mail (DKIM): A method for confirming that emails claiming to have originated from a particular mail server really did originate from that server.
Mail transfer agent restrictions: These days, most MTAs are configured to only accept emails from people who it already knows. (This is why you're seeing a Sender address rejected: not owned by user error message).
Instead, your best option — essentially your only option — is to put your own email address in the From: header, and send the email from your own mail server. If you want the reply to go to someone else, add a Reply-To: header containing their email address.
If you are using Exchange, you might be able to use a library such as Exchangelib, in which the author seems to have been inspired by some of Django's design decisions. Unfortunately, it does look like you will still need to ask for the user's password. I'm going to be looking into this further later on, and since I use LDAP authentication to the Django project, perhaps there is some way to use that to authenticate to the email server, but I have my skepticism.
See this question:
https://serverfault.com/questions/546255/sending-email-with-python-django-through-microsoft-exchange-imap

Emails sent using SendGrid on Heroku Django app to #gmail.com addresses seem to be blocked

I have a django app on heroku an using sendgrid.
I have gotten messages from a number of users with gmail email addresses saying that they have not received their validation emails after registering to use the site.
I tested it myself, and found that while emails with other addresses go through instantly, but for some gmail accounts it is not going through.
In the sendgrid dashboard, however, it says that all the emails have been delivered.
Can someone tell me what the issue here is? Is gmail blocking emails from my site? It just started happening these last two days. And we're not really sending out that many emails (10 or so a day)
Do the Emails end up in a spam folder, or do they truly disappear?
What kind of plan are you on at SendGrid? If you have your own dedicated IP, have you followed the guidelines on 'warming up' that IP address? Might also want to review the content of the message with SendGrid support, see if they can make any recommendations.
Emails end up in the spam folder. Whenever an email was sent from Heroku, Sendgrid to #gmail accounts, they were viewed as spam by Gmail.
I have the same problem and did not find a solution yet.