Special characters in django allauth subject line - python-3.x

I am using allauth's ResetPasswordForm for password reset process. This form's save method sends the password reset email. I customized the password reset template to use it in Turkish, so it includes some special characters. The email message itself is printed perfectly, displaying the special characters the right way. However, the subject line is printed as below for a subject I enter e.g. "öla".
"Subject: =?utf-8?b?W2V4YW1wbGUuY29tXSDDtmxh?="
If I give the subject "ola" without using the accent, there is no problem, it prints
"Subject: ola"
to the console. To stress again, this does not happen in the email body, which prints several special characters correctly. I only changed the allauth's template, and did not change anything in the form class.
Any idea how to fix this? Thanks.

Related

How to create a program that is able to search for a character and replace it with another word?

I have huge logs to look through and need to replace some parts of the logs to a more generic profile.
For example, in the logs, there are many email address. Email address are recorded as such. There are no criteria to how the emails are records:
abc#gmail.com
abc_efg#gmail.com
Anyone have any knowledge on how to convert this email address using ReGex, to convert abc to user, regardless on how the email was stored as seen below?:
#gmail.com
The purpose of this program is so that I am able to hide the email address of the users, before sending the file to someone else.
Tried to use RegEx but I am not sure on how to proceed.
Hope someone is able to help! Thanks
import re
text = 'this is my email Kapil#gmail.com or may be not'
re.sub('[A-Za-z0-9_]*#.*\.com', '********', text)
This will take all the words contains alphanumeric sequence or _ then check it they contains '#' next and followed by your domain name which can be gmail or any other comapany name ending with .com
All these condition will ensure the sequence of word we captured is an email and it will replace than email with '********'.

Azure Logic app read my approval email in form of HTML tags

I have created a Azure Logic app to read the email body and check for the condition - If the email body 1st line has the only word called "Approved", then trigger another process or else do nothing.
But when performing it, I could see the condition gets to false even though the mail has only Approved word in it accommodated with signatures in the bottom. After researching, I could see the email is being read like HTML tags. So i created two more variable to extract a part of this e-mail and check for condition.
EmailBodyTrimmed = trim(substring(toUpper(replace(replace(trim(variables('EmailBody')),' ',''),'.',''),),0,500))
EmailBodyTrimmedFinal = trim(substring(trim(replace(trim(variables('EmailBodyTrimmed')),' ','')),0,indexOf(replace(variables('EmailBodyTrimmed'),' ',''),'<')))
But nothing seems to give correct answer. Can anyone help me ?
I think you can use Body Preview to receive the body of the email:
According to my test results, it receives the text in non-HTML format, so you don't have to extract the body from the HTML text.
Then you only need to add a condition and use starts with to determine whether it starts with approved.
Of course, this premise is that your email body is in plain text format, if it is in excel format, you need to do other processing.

How to remove escape \' character from the mail body, mail sent PHPMailer

why I am getting the backslash () before the singlequote (') in my email body? email sent through PHPMailer.
Scenario:
In email : "I don\'t know who is Kiku!"
email screenshot
In database : "I don't know who is Kiku!"
database screnshot
Because someone messed up the code for sending the mail, most likely by redundantly escaping the string to send, thinking it will increase security. That's really all I can give you.

How to allow Tagged email addresses in Qmail?

Like we use recipient_delimiter in Post-fix such that if email address is "abc#host.com" then if we set "recipient_delimiter" to "+" (plus sign) in the /etc/post fix/main.cf file, now even if someone send an email on "abc+foo#host.com" or "abc+bar#host.com" then it will be delivered to the mailbox of "abc#host.com" only that is the plus sign and the content after the plus sign is ignored.
My problem is I want to achieve same in Q MAIL, can someone suggest me how to achieve that.
In qmail, these are called 'extension addresses'. Usually, the minus symbol is used as the delimiter instead of the plus symbol, but the functionality is the same as what you are describing, and it may be possible that the delimiter is configurable. See http://www.lifewithqmail.org/lwq.html#extension-addresses for more info.

How to use the encode with multiple email addresses and with subject line

I'm new to Expression Engine and trying to use the {encode} for two email addresses and would also like to pass a Subject line to the email when the user clicks on the link.
I was looking at the user guide for the encode standard global variable:
{encode="you#example.com" title="Email Me!"}
Could someone please provide an example of how to use the encode to include two email addresses as well as pass a Subject line?
You cannot pass more than one email addresses to the EE email encode function, nor set the subject line.

Resources