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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
sender@yourdomain.com, perhaps with a tag likesender+sent@yourdomain.com, and then set up a rule in the client you’ll be viewing this inbox with to route all emails with thatTO: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.