通常のメール送信方法
[Normal method of sending mail]
PHPでメールを送る場合は、下記のやり方などで送る方法があるかと思います。
ただ、作成者によって設定方法が異なったりするためメール送信クラスを使用して実装をします。
If you use PHP to send e-mail, you may be able to do so in the following way.
However, since the configuration method may differ depending on the author, we will implement this method using a mail sending class.
mb_language("japanese"); /Specify language settings and internal encoding
mb_internal_encoding("UTF-8");
$subject = "Subject line will be.";
$body = "The text will be included.\n\n";
// sender
$from = "××××@co.jp";
//Sender's email address[××××@co.jp]
$from_mail = "××××@co.jp";
// Sender Name
$from_name = "Sender Name";
//sender
$fromConvert = mb_encode_mimeheader(mb_convert_encoding("Sender Name", "ISO-2022-JP-MS")) . " <××××@co.jp>";
//header
$header = '';
$header .= "Return-Path: " . $from_mail . " \r\n";
$header .= "From: " . $fromConvert . " \r\n";
$header .= "Sender: " . $from . " \r\n";
$header .= "Reply-To: " . $from_mail . " \r\n";
$header .= "Organization: " . $from_name . " \r\n";
$header .= "X-Sender: " . $from_mail . " \r\n";
$header .= "X-Priority: 3 \r\n";
mb_send_mail($to, $subject, $body,$header,"-f Sender'××××@co.jp");
弊社のメール送信のやり方
[Our email sending rules]
メール送信メソッド呼び出し[Mail sending method call]
弊社のメール送信クラスを使用するときには、6つの引数を設定することでメール送信ができます。
下記の表より設定する内容をご確認ください。
When using our mail sending class, you need to set six arguments to send an e-mail.
Please check the table below to see what you need to set.
| $to | destination |
| $from_mail | Sender (e-mail) |
| $from_name | Sender(Name) |
| $title | Subject line will be. |
| $body | The text will be in |
| $returnMail | Error mail sent to |
STATIC_MAIL_AGGREGATION::mailSendAction($to,$from_mail,$from_name,$title,$body,$returnMail);