How to determine the smtp server save send mails or not?

给你一囗甜甜゛ 提交于 2019-12-25 01:33:47

问题


When sending mail using SMTP server, how to determine whether the smtp server rely and save send mails to "Sent" folder or not.

Example

When sending mail using GMail smtp server ( smtp.gmail.com ), GMail server automatically rely and save the mail to "Sent" folder. But few other server like Exchange, GoDaddy,.. these are the servers not saving the mail to "Sent" folder. We have to manually append the message to respective folder using IMAP append command.

If I able to find whether the server won't save send mails to "Sent" folder means, I can invoke IMAP append command to save the mail to "Sent" folder


回答1:


You cannot find that out. But you can make gmail and godaddy behave almost compatibly by sending a Bcc to the user. Gmail does that automatically, but if you do it explicitly the user still gets only one copy.

When you send mail via SMTP, add "rcpt to:<myaddress@doma.in>", and both gmail and godaddy will write the message to some filter. If you're lucky the message is even in the right folder.



来源:https://stackoverflow.com/questions/30729128/how-to-determine-the-smtp-server-save-send-mails-or-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!