awdeorio / mailmerge

A simple, command line mail merge tool.
MIT License
140 stars 41 forks source link

smtp sends two copies #77

Closed craftyarch closed 4 years ago

craftyarch commented 4 years ago

When sending a mail under arch linux with a pip install and only sending one mail merge it appears to send the message twice. Also using office 365 smtp server.

awdeorio commented 4 years ago

Can you provide a sample template and database? Preferably as small as possible to recreate the problem.

craftyarch commented 4 years ago

Apologies for delay in reply. Had to collect the above for my work computer. ============mailmerge_template.txt=========== TO: {{email}} SUBJECT: introduction FROM: Mr B <b**.co>

Dear {{parentname}}

I am happy to confirm that {{studentname}} will be in my mentor group this year.{{he}} is a valued asset.

Kind Regards Mr B****

==============mail_merge_database.csv======

studentname,he,parentname,email L*,she,"Mr B and Mrs W",b*****@gmail.com

========================================

Thanks again for your wonderful piece of software and for the time you have taken to reply and assist.

awdeorio commented 4 years ago

I tried to replicate the problem, but I'm having trouble. I copied your template and database, then modified to the email addresses so that it would send the email to my own address. I received a single message. There's nothing unusual in your template or database, so I'm not terribly surprised.

My next hypothesis is that this has something to do with the MS Office 365 SMTP server. Is it possible that this issue is affecting you? https://answers.microsoft.com/en-us/msoffice/forum/all/sending-out-duplicate-emails-when-sending-through/d0ffc4be-14a9-492e-9336-3ce53098e9d6

craftyarch commented 4 years ago

Okay great thanks for your time. I will use gmail smtp instead in future. best wishes