スクリプトはしばらく動作していましたが、バックアップするのを忘れ、SMTP を使用して GoDaddy E-Mail から埋め込み E-Mail を送信できるようになった方法を忘れてしまいました。「f5e66463@p3nlhg1093.shr.prod.phx3.secureserver.net」からの電子メールのみが届きます。
これが私が今いるポイントです:
inv.php
<?php
require_once('phpMailer/class.phpmailer.php');
require_once('phpMailer/language/phpmailer.lang-en.php');
date_default_timezone_set('America/Detroit');
// PHP mail version (default)
$mail = new PHPMailer(true);
$mail->IsSMTP(); // Using SMTP.
$mail->SMTPDebug = 1; // Enables SMTP debug information - SHOULD NOT be active on production servers!
$mail->Host = "relay-hosting.secureserver.net"; // SMTP server host.
$mail->Username = 'username@godaddydomain.com';
$mail->Password = 'godaddypassword';
$mail->IsHTML(true);
$mail->Body="
Your Name: $from_name
Your E-Mail: $from
Friends Name: $to_name
Friends E-Mail: $to";
$from_name = $_REQUEST['your-name'];
$from = $_REQUEST['your-email'];
$to_name = $_REQUEST['friends-name'];
$to = $_REQUEST['friends-email'];
$subject = 'Mail Test at '.strftime('%T', time());
$message = '<img src="cid:video2">';
$mail->AddAddress('testmail@test.te');
$mail->AddEmbeddedImage('video.jpg','video2','video.jpg');
$result = mail($to, $from, $subject, $message, $headers);
if(!$mail->Send()) {
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message sent!';
}
?>
招待.html
<form action="inv.php" method="post" id="ContactForm">
<fieldset>
<ol>
<li>
<label for=name>Your Name</label>
<input id="from_name" name="from_name" type="text" placeholder="from_name" required autofocus>
</li>
<li>
<label for=email>Your Email</label>
<input id="your-email" name="your-email" type="your-email" placeholder="example@domain.com" required>
</li>
<li>
<label for=name>Friends Name</label>
<input id="to_name" name="to_name" type="text" placeholder="to_name" required autofocus>
</li>
<li>
<label for=email>Friends Email</label>
<input id="friends-email" name="friends-email" type="friends-email" placeholder="example@domain.com" required>
</li>
</ol>
</fieldset>
<fieldset>
<button type=submit>submit</button>
</fieldset>
</form>