Can't send email to myself - opencart

I'm using opencart 1.5.1.3. For some reason I can't send an email to the same account I am sending from. For example, I can't receive the notification email when an order is placed. The email reaches the customer OK and if I specify additional email address to send the mail to, they receive the email OK, the email configured as the store email addres doesn't receive the email. I'm using the 'mail' option to send email.
The email is hosted at google apps. Please help

some web hosting prevent self-to-self email for safety reason.
maybe it is your hosting provider block this mail.

Related

How can I set up a noreply#mydomain.com email in SES

I want to be able to send messages using SES. My sender's email is noreply#mydomain.com . The domain and sender's email are verified identities in SES. Now whenever my app sends an email, I don't want the receiver to be able to reply to the email I sent. How can I configure the sender email so that it never receives an email as reply from the user?
Ok so this is going to sound simple but follow this guide. There is one step though I struggled with which I got lost for hours on. Guide
Make sure when you're creating the MX record, you need to add the inbound SMTP as well as the normal email smtp.
10 inbound-smtp.us-east-1.amazonaws.com
11 email-smtp.us-east-1.amazonaws.com
You need to add both in order to receive email as well. Then, your rule sets will work as intended.

AWS SES Not Delivering

I am currently using AWS SES to send emails to my users. However, it appears that my users who use outlook / Microsoft's Business Email System are not receiving my emails. SES also tells me that I have no bounces too.
The user's email has {name}.onmicrosoft.com on it.
How can I go about resolving this?
EDIT: Found out that the key phrase "password" is a root cause for the email being blocked and not showing up at all. Not sure how to combat this as I am sending a password reset email.
Thanks

How to make sure email is not received in spam when sent with Django EmailMessage class?

I have the following settings in my settings.py file.
EMAIL_HOST = 'mail.domain.com'
EMAIL_HOST_USER = 'me#domain.com'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
A user in my Django application is able to send an email to a client with a PDF attachment using the EmailMessage class. Here is the code:
email = EmailMessage()
email.subject = 'Demo subject'
email.body = self.request.GET.get('email_body', '')
email.from_email = 'Full Name <user#domain.com>'
email.to = ['{}'.format(self.request.GET.get('to_address'))]
email.attach_file(os.path.join(settings.MEDIA_ROOT, 'quotation_email.pdf'))
email.send()
My questions are,
Since I can create a code to send the email as a different person, will the email not be marked as spam in certain domains?
I have access to a mail server which is already setup. Can I map the email accounts to the user accounts in the Django application in such a way that Django uses the email server as a medium to send email based on the logged in users?
Why do I need to provide an email and password in settings.py file when I may never use that email account to send any mail? Can I not log in to the email every time someone sends an email?
Since I can create a code to send the email as a different person, will the email not be marked as spam in certain domains?
The domain part of the email (part after #) is what mostly determines if the email will end up as spam or not (there are, of course, other conditions in determination of spam such as IP reputation of the sending mail server i.e. was this IP used for sending spam in the past, etc).
If you are the authorised sender for a particular domain, you can send emails like john#domain.com or no-reply#domain.com without worrying.
Read about SPF and DKIM records about domain authorisation. It's a topic that I can't really cover in an answer.
I have access to a mail server which is already setup. Can I map the email accounts to the user accounts in the Django application in such a way that Django uses the email server as a medium to send email based on the logged in users?
Yes, you can if you own the email's domain name. Just get the user's email address and use it as the From address to send the email.
Why do I need to provide an email and password in settings.py file when I may never use that email account to send any mail? Can I not log in to the email every time someone sends an email?
Are you referring to the EMAIL_HOST_USER? This is for authentication purpose. This email is required to log into your SMTP server. Without this, the SMTP server will not know if you are the owner of the server or a spammer trying to use their server to send spam.
But if the SMTP server is running locally, you can just use localhost as the EMAIL_HOST and leave out the authentication. Because most email servers (MTAs) relay emails from local host without requiring authentication. But this also depends on the configuration.
Basic understanding of how emails are sent:
Emails are sent just like the real mail - inside an envelope. The envelope and the letter inside it can have different From addresses. And that is also true in case of emails.
Here's an illustrative example. Suppose you own a PO Box. If you want to send a letter to your friend, you'll do this:
Write your message on a paper. You'll sign the letter.
Buy an envelope. Write To address of your friend on the envelope.
Write the From address of your PO Box on the envelope. You don't write your own address, because if the mail couldn't be delivered, it will be returned back to your PO box.
Send out the letter.
Pretty, simple. Suppose someone in your family also wants to send out a letter to someone they know. But they don't own an PO Box. They'd have to spend some money and time to get a PO Box. But why bother, because you already have one. This is how that will work:
They'll write the message on a paper. They'll sign the letter in their own name.
Buy an envelope. Write the the To address of their friend.
Write the From address of your PO Box, so that the mail could be returned to your PO Box if it didn't deliver.
Send the letter out.
This is how actual emails work.
An SMTP server is like a Post Office.
Your email account is like a PO Box.
Every message you send, goes inside an envelope.
The sender address on the envelope can be different than the sender
address on the message inside.
I think Django uses the EMAIL_HOST_USER settings to compose the email envelope and the from_email address you provide is used as the From address.
The sender address on the envelope in known as MAIL FROM address or the Return-Path address. This is not shown to the receiving user. The From address that you see in your Gmail, or Yahoo Mail, is called the MIME From address. They both can be different.
The case is not you sender gmail.
but you need to remove all links inside your html template

Email send through Postmark is not received by user

In our application email is send to users using postmark service, but user says that he dint receive any emails. Is there any way to know why these emails were not received by the end user?
I checked the Junk folder its not there in that and the From Email ID is also whitelisted. Only some of the emails are not received.

Service for alias emails like Air bnb or craigslist

I'm looking for a service, surprised sendgrid doesn't provide this. On our site users can send emails to other users. We don't want to provide them with the actual email address. Are there any services that provide email aliasing and forwarding. The service would create an email address that could be replied to, that email would send the email immediately to the aliased address. Stats on the emails sent would be kept but not the contents of the emails.
You can use SendGrid's Inbound Parse Webhook as an intermediary to do this. Instead of having the users email each other directly, you can have the one user (User A) email a specified email address that receives the email. Then, send an email to another user (User B) with the information parsed from the original email. Here is an example of this type of communication between two users.