In my apps I’m using CurlMBS to send emails; it works fine.
Now I’d like to implement my code to save sent email in IMAP sent folder.
Starting from https://www.mbsplugins.de/archive/2017-12-14/Upload_email_to_Sent_folder_vi, I’ve implemented with success the code and now I can save sent emails, but with some IMAP server (also Gmail), I’ve got this error:
Upload failed (at start/before it took off)
Googling looking for a solution, I found these info about the error:
25 failed upload “command”
and
FTP couldn’t STOR file. The server denied the STOR operation, used for FTP uploading.
and
Upload failed. The server refused to accept or store the file that curl tried to send to it. This is usually due to wrong access rights on the server but can also happen due to out of disk space or other resource constraints. This error can happen for many protocols.
Testing with Gmail, to exclude any simple errors:
Trying with wrong username/password, the error is: 67 - Login denied
Trying with wrong IMAP url as:
myCurlMBS.OptionURL = "imaps://Ximap.gmail.com/Sent"
instead
myCurlMBS.OptionURL = "imaps://imap.gmail.com/Sent"
I’ve got the error: 6 - Could not resolve host: Ximap.gmail.com
so it seems the app can connect to the server, but there’s something wrong when the code try to upload the email into the IMAP sent folder.
I tried to set different CurlMBS options, but I can’t solve the issue.
Any ideas?
Thanks in advance
Pietro