PrettyPrinted / youtube_video_code

The code for all the YouTube videos I publish on YouTube.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SMTP mail is slow

hkarthik97 opened this issue · comments

commented

Hi,
I am trying to send a reset email but the problem is whenever I try to trigger an email it is a bit slow it takes at least 5-10 sec to trigger the email. I also tried to do multi-threading but that dint work. Is there is a problem with my SMTP provider or any problem with my code?
I am using Hostinger as my SMTP.
Can you suggest to me a good SMTP provider

def forgetPasswordMail(email,token,msg,link):

msg.body = 'Your link is {}'.format(link)
mail.send(msg)

    token = s.dumps(email, salt='forget-password')
    msg = Message('Reset Password', sender='test@test.com', recipients=[email])
    link = url_for('reset_password', token=token, _external=True)
    start_new_thread(forgetPasswordMail,(email,token,msg,link))