私は、メーラを動作させるためのサンプルアプリケーションを構築しました。アプリはhttps://blooming-brushlands-80122.herokuapp.com、 でホストされ、ソースコードはhereです。ここでは、アクションのメーラーに関連付けられている私の設定です:電子メールをレールで使用できない
config.action_mailer.delivery_method = :sendmail
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_options = {from: '[email protected]'}
とメーラー
def create
@user = User.new(user_params)
respond_to do |format|
if @user.save
# Sends email to user when user is created.
ExampleMailer.sample_email(@user).deliver
format.html { redirect_to @user, notice: 'User was successfully created.' }
format.json { render :show, status: :created, location: @user }
else
format.html { render :new }
format.json { render json: @user.errors, status: :unprocessable_entity }
end
end
end
を送信するためのアプリがユーザーに電子メールを送信することはありません。
誰にも理由がありますか?
LESS叫ん – tadman
は、タイトルを変更してください* _ * –
の質問 – bkunzi01