datawookie/emayili

[BUG]: using emayili to send to gmail

thierry59000 opened this issue · 6 comments

Description of the bug

Hi,
I have a new problem using emayili that didn't happend before. When I send a mail from an OVH based adress to a gmail adress, I receive an "Undelivered Mail Returned to Sender" :

XXXX@gmail.com: host gmail-smtp-in.l.google.com[108.177.15.26] said:
550-5.7.1 [178.32.123.219] Messages missing a valid messageId header are
not 550 5.7.1 accepted.
v26-20020a7bcb5a000000b003ef6e812835si1551757wmj.207 - gsmtp (in reply to
end of DATA command)

I don't encouter this issue when:

  • sending from my work adress to a gmail adress
  • sending from my OVH based adress to a non gmail adress

Steps To Reproduce

options(envelope.details = TRUE)
options(envelope.invisible = FALSE)

smtp <- server(
	  host = "ssl0.ovh.net",
	  port = 465,
	  username = "abcd@mydomain.fr",
	  password = "mypassword"
)

email <- envelope(
	  to = "XXXX@gmail.com",
	  from = "abcd@mydomain.fr", 
	  subject = "This is a the subject",
	  text = "Hello!"
)

smtp(email, verbose = TRUE)

Hi @thierry59000, I'm afraid that I don't have an account with OVH so I can't replicate this issue (it works fine for me with all of my existing email addresses).

Can you please do the following for me to help debug:

  1. Send an email from your OVH account to me (my address is in the DESCRIPTION file for the package) using your normal email client (ie. not using {emayili}).
  2. Use {emayili} to send an email from your OVH account to your OVH account (or to any other account which does not have the problem). Then forward this email to me.

I'm hoping that between these two emails I'll be able to discern what's going on with the headers and provide a solution.

Thanks, Andrew.

Hi @datawookie,

thank you so much for your quick response. I will do that very quickly !

Thierry

Hi @thierry59000,

Can you please test something? Install as follows:

install_github("datawookie/emayili", ref = "message-id")

Then try sending the email again.

If this fails, please can you repeat point 2 above and send me the headers like you did earlier?

Thanks, Andrew.

Hi @datawookie,

sorry it took so long, It took me adges to update the dependencies needed to install your new version.

Unfortunatly I have the same problem. I'll send you by mail the headers of the emails. Belows is the call of the function :

Thanks, THierry

########################################

options(envelope.details = TRUE)
options(envelope.invisible = FALSE)

smtp <- server(
host = "ssl0.ovh.net",
port = 465,
username = "ABCD@snapmaths.fr",
password = "*****"
)

email <- envelope(
to = "EFGH@gmail.com",
from = "ABCD@snapmaths.fr",
subject = "Message send from my OVH adress to gmail using emayili",
text ="*** Some text here***"
)

smtp(email, verbose = TRUE)
[1] "XXXXXXXXXXXXXXXXXXXX"
[1] "ABCD@snapmaths.fr"
[1] "02a19d91323387f66d1def59990059008a42ec3feec909fbacb8c31c3297ca5a@snapmaths.fr"
Date: Thu, 13 Apr 2023 06:42:06 GMT
X-Mailer: {emayili}-0.7.15
MIME-Version: 1.0
To: EFGH@gmail.com
From: ABCD@snapmaths.fr
Subject: Message send from my OVH adress to gmail using emayili
Message-ID: 02a19d91323387f66d1def59990059008a42ec3feec909fbacb8c31c3297ca5a@snapmaths.fr
Content-Type: text/plain;
charset=utf-8;
format=flowed
Content-Transfer-Encoding: 7bit
Content-MD5: UamtvmmlJs/zAv2ThzlTqQ==

*** Some text here***[1] "XXXXXXXXXXXXXXXXXXXX"
Too old connection (277 seconds idle), disconnect it
Connection 1 seems to be dead
Closing connection 1
schannel: shutting down SSL/TLS connection with ssl0.ovh.net port 465
Send failure: Connection was aborted
schannel: failed to send close msg: Failed sending data to the peer (bytes written: -1)
Too old connection (317 seconds idle), disconnect it
Connection 0 seems to be dead
Closing connection 0
schannel: shutting down SSL/TLS connection with api.github.com port 443
Hostname in DNS cache was stale, zapped
Trying 193.70.18.144:465...
Connected to ssl0.ovh.net (193.70.18.144) port 465 (#2)
schannel: disabled automatic use of client certificate
220 GARM-97G002 Thursday, April 13, 2023
EHLO DESKTOP-9RNHOB4
250-OVH SMTP PROXY Hello
250-SIZE 104857600
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
AUTH PLAIN
334
AG5lcGFzcmVwb25kcmVAc25hcG1hdGhzLmZyAERpbWFuY2hlNTlA
235 2.7.0 Authentication successful
MAIL FROM:ABCD@snapmaths.fr
250 2.1.0 Ok
RCPT TO:EFGH@gmail.com
250 2.1.5 Ok
DATA
354 OK
Uploaded 700 bytes...Date: Thu, 13 Apr 2023 06:42:06 GMT
X-Mailer: {emayili}-0.7.15
MIME-Version: 1.0
To: EFGH@gmail.com
From: ABCD@snapmaths.fr
Subject: Message send from my OVH adress to gmail using emayili
Message-ID: 02a19d91323387f66d1def59990059008a42ec3feec909fbacb8c31c3297ca5a@snapmaths.fr
Content-Type: text/plain;
charset=utf-8;
format=flowed
Content-Transfer-Encoding: 7bit
Content-MD5: UamtvmmlJs/zAv2ThzlTqQ==

Uploaded 700 bytes... all done!
250 2.0.0 Ok: queued as C3D591FE0B
Connection #2 to host ssl0.ovh.net left intact

Hi @thierry59000, a quick Google for "messages missing a valid messageid header are not 550 5.7.1 accepted" yielded a number of hits.

image

This seems to be a problem on the SMTP server. Most likely requires then to add a SPF record (see here). I suggest contacting OVH.

Sorry not to be able to help, but this doesn't appear to be an {emayili} problem.

Best regards, Andrew.

You helped a lot,

thank you @datawookie.

Best, Thierry