はじめに
まずは下記リンクからQdmailをダウンロードしましょう。
http://hal456.net/qdsmtp/
使用したファイルか以下です。
- qdmail.php
- qdsmtp.php
PHP
require_once('qdmail.php');require_once('qdsmtp.php');$from_address = "test@co.jp";$from_name = "名前";$subject = "件名";$text = "本文";$mail = new Qdmail();mb_language('ja');mb_internal_encoding('UTF-8');$mail -> lineFeed("\n");$to = "test@co.jp";$mail->to($to); // 宛先$mail->subject($subject); // 件名$mail->text($text); // 本文$mail -> from($from_address , $from_name); // 送信元$mail -> addHeader('Return-Path', $from_address);$mail->send();PHP以上で完了!とても簡単でした。