我已经使用php创建了一个网页,它允许人们上传他们的简历,这个简历将发送到特定的电子邮件ID。我想开发此功能,同时,它应该向用户电子邮件ID发送一封确认邮件,说“谢谢申请我们,我们会尽快与您联系”。我是如何用PHP完成的。请帮我 。
答案 0 :(得分:0)
我强烈建议您使用SwiftMailer(http://swiftmailer.org)来实现此功能,因为您需要的邮件头和所有配置都由此库处理。您也可以使用多个接收器或在同一个"同一个"时间。
无论如何你必须发两封邮件:
亲切的问候!
答案 1 :(得分:0)
尝试这种方式,以此为例,根据您的需要进行修改:)
$subject = 'Welcome To demo.com';
$mydata['name'] = //name here;
$mydata['email'] = //user email id
$mydata = (object)$mydata;
$message = "<div style='height: 500px; background: none repeat scroll 0% 0% rgb(241, 241, 241); border: 1px solid rgb(6, 106, 117); width: 450px;'>
<div style='width: 100%; background: none repeat scroll 0% 0% rgb(6, 106, 117); height: 80px;'>
</div>
<div style='width:100%;height:360px; margin: auto; float:left; text-align: center;'>
<h2>Hello $mydata->name</h2>
<h3>Thank for applying with us , we will contact you soon.. !!</h3>
<br>
</div>
<div style='height:30px;padding-top:10px;float:left; width:100%;text-align:center;background:#1d5770;'>
<span style='color:#fff;font-weight:bold'>demo Team</span>
</div>
</div>";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "To: $mydata->name <$mydata->email>" . "\r\n";
$headers .= "From: demo.com <contact@demo.com>" . "\r\n";
mail($mydata->email, $subject, $message, $headers); // Sending a mail to the Registered User
进一步参考请点击这些链接
http://www.w3schools.com/php/php_ref_mail.asp
http://php.net/manual/en/function.mail.php