是否有办法自动回复特定邮件。这里的过程是您通过例如提出请求。 outlook,然后回复您提出的请求的回复。
答案 0 :(得分:0)
是的,您使用POP3或IMAP定期检查收件箱中的邮件,如果有与您的请求格式匹配的邮件,请执行操作。
类似的东西(实际上不是一个有效的例子,更像是伪代码)
mail=Mail.login(:server => 'foo',
:user => 'john',
:password => 'john_is_the_king_pimp'
)
while 1==1
mail.new_messages do |msg|
if msg.subject.match(/^REQUEST/)
read stuff from the message and do something about it
end
end
sleep 60
end