嗨我可以使用发送邮件功能发送我想要的电子邮件,但客户端发送的文件夹中没有发送已发送的邮件。Rails ActionMailer将电子邮件复制到发送文件夹SMTP ruby
我必须手动将电子邮件以某种方式复制到发送的文件夹吗?在配置低于和作品发送电子邮件,仅供参考
config.action_mailer.smtp_settings = {
address: 'send.XXX.com',
port: 587,
domain: 'XXX.com',
user_name: '[email protected]',
password: 'XXX',
authentication: 'plain',
enable_starttls_auto: true }
我怎样才能做到这一点的Rails
更新
可以做到方便地与IMAP,只是做一个新的邮件, Mail.new等则
target_mailbox = 'Inbox.Sent'
imap = Net::IMAP.new("imap.someserver.com")
imap.authenticate(email_account.authentication, email_account.user_name, email_account.password)
imap.create(target_mailbox) unless imap.list('', target_mailbox)
imap.append(target_mailbox, imap_sent_mail_copy.to_s)
imap.logout
imap.disconnect
你有没有解决问题了吗? – Mattherick 2015-07-08 11:19:58