Can't send emails through msmtp

Added by Gregório R. de Miranda almost 7 years ago

Hello,
I set up msmtp following instructions given on this topic. Everything works fine when I send mails from command line, but I can't get it to work from the AMC gui.

When I try sending the annotated papers to students e-mails I get "0 message(s) has been sent." but, curiously, no error message at all.

The command output details are:

===<mailing>=+0.333333333333333
===<mailing>=+0.333333333333333
===<mailing>=+0

AMC configuration:

Sender email: gxxxr@gmail.com
Mail delivery method: sendmail
sendmail path: /usr/bin/msmtp

.msmtprc content:

defaults
port 587
tls on
account gmail
host smtp.gmail.com
from gxxxr@gmail.com
auth on
user gxxxr
password xxxx
account default : gmail

Students identification csv content:

id,name,email
00001,Rogerinho do Ingá,xxx@gmail.com
00002,Maria Antonieta,xxx@gmail.com
00003,Felicia Almeida,xxx@gmail.com

I don't see students data on the send page, but I don't if its relevant:

Gmail is set up to enable access through less secure apps.

I'm using debian 9 and the msmtp version is 1.6.6.

What am I missing?


Replies (9)

RE: Can't send emails through msmtp - Added by Gregório R. de Miranda almost 7 years ago

Update:

I run AMC from the terminal and tried sending the emails. Got the messages below, but still lost. As you can see, the ids and names are unique, and now the emails are too.

Error: non-unique name (0 records)
Error: non-unique name (0 records)
Error: non-unique name (0 records)
Error: non-unique name (0 records)
Error: non-unique name (0 records)
Error: non-unique name (0 records)

RE: Can't send emails through msmtp - Added by Stewart Thomas almost 7 years ago

I have one line that you're missing, and also I'm not sure if order matters.

Try adding:
tls_certcheck off

and changing
auth login

Here's my file:

defaults
account gmail
host smtp.gmail.com
tls on
tls_certcheck off
port 587
auth login
from whomever@university.edu
user whomever@university.edu
password hunter2

account default: gmail

RE: Can't send emails through msmtp - Added by Alexis Bienvenüe almost 7 years ago

Can you try in debugging mode (From the Help menu), and post the log file?

RE: Can't send emails through msmtp - Added by Gregório R. de Miranda almost 7 years ago

Stewart,

I made these changes but got the same results.
Dude, I hope that's not your true password.

Alexis,

Please, see the debug file attached.

RE: Can't send emails through msmtp - Added by Stewart Thomas almost 7 years ago

It's not :) It's an old IRC reference ( http://bash.org/?244321 )

I know I had trouble getting AMC to work with gmail too. However, when I look at my list of students (the original png you attached) it displays the names and email addresses. Somehow, I'm guessing your student/paper association is off. My only suggestion I can think of would be to look at your csv file encoding. I think I had trouble with that before.

RE: Can't send emails through msmtp - Added by Gregório R. de Miranda almost 7 years ago

hahaha I didn't know that!

However, when I look at my list of students (the original png you attached) it displays the names and email addresses.

Hm, interesting. So it's an error after all.

But actually, despise that, AMC is handling pretty well the student/paper association. The automatic association, openoffice marks report and annotated papers are flawless.

The csv file enconding is UTF8, as well as "CSV charset" and "Students lists charset" configs in AMC Preferences.

RE: Can't send emails through msmtp - Added by Alexis Bienvenüe almost 7 years ago

So it's an error after all.

Yes. Names and emails should be shown here.

Maybe this is problem with leading zeroes in IDs, related with #466?
Can you test a project/names list that does not include IDs with leading zeroes?
Can you test with AMC development version?

RE: Can't send emails through msmtp - Added by Gregório R. de Miranda almost 7 years ago

Maybe this is problem with leading zeroes in IDs, related with #466?
Can you test a project/names list that does not include IDs with leading zeroes?

Oh yes, that's it! I removed the leading zeros and now everything works fine, thank you!

Can you test with AMC development version?

Is it still relevant? I could try.
Is there any way I can help?

RE: Can't send emails through msmtp - Added by Alexis Bienvenüe almost 7 years ago

Is it still relevant? I could try.

I think you shoud not have this problem with the development version, even with IDs that have leading zeroes.

(1-9/9)