I am trying to setup sparkpost account with my erpnext account and I seem to be getting the below scheduler log for sending emails
(550, '5.7.1 Unconfigured Sending Domain <gmail.com>')
Traceback (innermost last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/bulk.py", line 294, in send_one
smtpserver.sess.sendmail(email["sender"], email["recipient"], encode(email["message"]))
File "/usr/lib64/python2.7/smtplib.py", line 745, in sendmail
raise SMTPDataError(code, resp)
SMTPDataError: (550, '5.7.1 Unconfigured Sending Domain <gmail.com>')
Now this error comes when I use the following settings as below:
Now basically the erpnext system is trying to send email via sparkpost with TO: field as “firstname.lastname@example.org” but in my account I have only configured the sending domain for “xyz.com” since I don’t own gmail.com.
Now the emails go out fine with the Always use account’s email ID as sender as CHECKED.
Now my question is that how can I use the above check box unchecked and still be able to use sparkpost to send emails as we are using the user’s email ID to be sender’s email id and not the email account’s email id.
Should I change the user_id and password or something else.
@adityaduggal unlike Mandrill, Sparkpost does not allow email masking i.e. you can’t send using FROM address of gmail. You can only send through are verified domain that you own.
So, say you create an email address ‘email@example.com’. All emails will go with this as ‘FROM’ email address. But will be rendered in the email client as
Aditya Duggal <firstname.lastname@example.org>, with Reply-To set as your email address i.e.
Aditya Duggal <email@example.com>.
This happens only when you check
Always use Account's Email ID as Sender, you set the account’s email ID as
firstname.lastname@example.org and this email ID is verified by Sparkpost.
Does this make it clear?
If you want to use email masking, go for Sendgrid
@anand Thanks for the input, I was unable to search for this over google owing to my bleak knowledge of keywords “masking”.
Another thing I would like to know is that whether the communication can pull the state of the email from sparkpost via API like “OPENED”, “READ” etc. on the communication status itself, I have been out of luck for this feature since the Mandrill app stopped working and somehow the sendgrid integration does not seem to be pulling the status on my communications.
@adityaduggal due to the mandrill fiasco, we think that there is no point in making such a plugin as it won’t be maintained. As soon as the Email Queue pushes the email to Sparkpost, it is considered sent. It is better to develop our own ‘Open’ notification system than rely on such a service. Maybe someone from the community can build this feature for frappe framework.