====== 2024.01.24 Rubyで簡単なメール送信スクリプト ====== require 'net/smtp' # メールサーバーの設定 smtp_server = '[MAIl_SERVER]' smtp_port = 587 # 送信元メールアドレスと認証情報 from_address = '[FROM_MAIL_ADDRESS]' password = '[PASSWORD]' # 送信先メールアドレス to_address = '[TO_MAIL_ADDRESS]' # 件名と本文 subject = 'Test Email' body = 'This is a test email from Ruby.' # メールヘッダ message = < {{tag>日記 Ruby Mail}}