gpt4 book ai didi

ruby-on-rails - 将变量传递到 block 中 - Rails

转载 作者:数据小太阳 更新时间:2023-10-29 07:14:11 26 4
gpt4 key购买 nike

<分区>

在我的 Rails 应用程序中,我使用这个 gem 与 Gmail API 交互:https://github.com/gmailgem/gmail

这是我发送电子邮件的方法:

gmail = Gmail.connect(params[:email], params[:password])
@email = params[:email]

email = gmail.compose do
to @email
subject "Having fun in Puerto Rico!"
body "Spent the day on the road..."
end
email.deliver!

我收到这个错误:

An SMTP To address is required to send a message. Set the message smtp_envelope_to, to, cc, or bcc address.

电子邮件变量无法传递到 block 中。是什么原因造成的?如何传递动态电子邮件地址?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com