Recieving emails from my website through flask? - python

I have an email form on my webpage where the goal is for users to be able to send my account an email. They give me their email but is there a way to send a message from their email to my email without their password. All i'm seeing online is code to send out emails through flask not recieve. What work arounds do you guys suggest where I can have users send me an email through my website.

I am pretty sure that this is not possible.
Otherwise you would have "access" on their account and could write mails to everyone you want.
A solution would be to save the message in the database and if you need it, you can send the message to you, with all the needed information, by your own mail adresse (like AKA commented).

Related

Reply to email python smtp

I am trying to write python code to reply to an email. I have manually checked in Gmail and understood that Gmail replies to an email using the same subject and uses the message uid. I am using Gmail, so I have referred to this link (Setting different reply-to message in Python email/smtplib) and implemented the same code. I am able to send the email but it does not send as an email reply. How do we implement if a#gmail.com wants to reply to an email sent from b#gmail.com? Could someone please share a snippet of code explaining the same?

Gmail Email Threading

I'm building an CRM and I have included email within it. When I send out an email from my CRM to a gmail account and then reply to it from the gmail account it automatically threads the conversation (within Gmail), however if I then reply to the reply from my CRM it starts a new thread within Gmail.
I read https://webapps.stackexchange.com/questions/965/how-does-gmail-decide-to-thread-email-messages which states the it is based on the email subject but this doesn't seem to be working a per my issue.
Bearing in mind, when I say I am 'replying' I simply mean I am sending another email with the same subject (to and from the same emails obviously).
The weird thing is, if I send out another email from my CRM with the same subject to the same email it does thread that, just not the reply.
Anyone know why this is happening and how I can fix it?
UPDATE:
Probably worth mentioning, I am parsing the replies, so the previous email bodies are not included.
Threading based on subject isn't standard. You should set in-reply-to header to message-id of first email.

Python / Django | How to store sent emails?

I was wondering how can I store sent emails
I have a send_email() function in a pre_save() and now I want to store the emails that have been sent so that I can check when an email was sent and if it was sent at all.
I think the easiest way before messing up with middleware or whatever is to simply create a model for your logged emails and add a new record if send was successful.
Another way to look at it: send the mail to your backup email account ex: backup#yourdomain.com. So you can store the email, check if the email is sent or not.
Other than that, having an extra model for logged emails is a way to go.
I would suggest making use of an existing django mail app.
django-mailer may do the trick. It has a message log.
I think it is best not to send email directly from views, your views then won't get blocked if your mail server happens not to be functioning, so that's another reason to use something like this.

Sending Mail with low level python mail api (Google App Engine)

I need to embed images in email but GAE email api wont let me. So i need to use low level python api but i dont know how to authenticate with it. Is it possible? And if its possible simple example like sending text/plain email can be enough.
Thanks.
In GAE, with Mail API, you can embed image using message.html instead message.body.
This is the related docs email message fields

AppEngine python send email api is marked as SPAM by Gmail email reader

We send email using appengine's python send_mail api.
Is there any way to tell why an email that is sent to only one recipient would be marked as SPAM. This seems to only happen when appengine's python send_mail api sends to Gmail.
In our case we are sending email as one of the administrators of our appengine application.
And the email is a confirmation letter for an order that the user just purchased, so it is definitely NOT SPAM.
Can anyone help with this?
It seems odd because it is only GMail users that seem to be reporting this issue and we are sending from appengine (All Google servers) I love Google but sometimes Google is stricter to itself than to others :)
I've added the spf TXT record to DNS such as "v=spf1 include:_spf.google.com ~all"
(I'm hoping that will help)
I've tried to add a List-Unsubscribe header to the email but it seems app engine python send mail does not support this header.
Thanks,
Ralph
My guess would be that the content of the mail looks "spammy" for Google, but you can do some things that might help you.
I would suggest you, since this is a confirmation mail, add another admin for your app an email like: do-not-reply#domain.com and use that one for the confirmation emails. Add more text to the body and include the unsubscribe links as well, so your users will have the possibility to not receive more email from your app. Maybe you wouldn't like the last part, but you have to give that options to your users, so this email won't be marked as SPAM.

Categories

Resources