When I use my regular client and send email through SMTP for an IMAP account, that outbound email gets saved in the IMAP "Sent" box.
How can I have the same behavior when I send email using Ruby on Rails ActionMailer?
When I use my regular client and send email through SMTP for an IMAP account, that outbound email gets saved in the IMAP "Sent" box.
How can I have the same behavior when I send email using Ruby on Rails ActionMailer?
This tends to be a setting in your mail client program, from what I can tell; but I don't see much support for it in ActionMailer.
There is a ruby IMAP library, if you find that the messages are getting stored on the server, but just in the wrong place. http://ruby-doc.org/stdlib/libdoc/net/imap/rdoc/index.html
A workaround might be to send every message to your originating email address say [email protected]
, perhaps with a tag like [email protected]
, and then set up a rule in the client you'll be viewing this inbox with to route all emails with that TO:
to the Sent Items box.
If you're using gmail as your mail server for your rails application, it saves a copy in the sent mail automatically.