Benim ücretsiz gmail kutunuza kullanıcı postaları almak için nasıl web siteme oluşmaya bize ulaşın. Benim web sitesi ismi ile e-posta kullanmayın. i ücretsiz gmail kullanın. Ben birçok senaryo denedim ama her alanındaki e-posta hesabı gerekir.
Bu soru ile ilgisi var mı This One?
Sitenizde bir form var çok iyi, doğru, kullanıcıların doldurmak ve bu veri ile bir e-posta gerekir?
Basit bir örnek:
<form action="sendMail.php" method="post">
Name: <input type="text" name="name" id="name" /><br />
Email: <input type="text" name="email" id="email" /><br />
Text: <textarea name="text"></textarea><br />
<input type="submit" value="Send" />
</form>
sonra, php sayfa posta göndermek wich:
//php sendThis.php page
<?php
require("class.phpmailer.php");
$name = $_POST['name'];
$email = $_POST['email'];
$text = $name . ', ' . $email . ' has filled the form with the text:<br />' . $_POST['text'];
$from = 'your.email@gmail.com';
$to = 'your.email@gmail.com';
$gmailPass = 'your gmail password';
$mail = new PHPMailer();
$mail->IsSMTP();
// enable SMTP authentication
$mail->SMTPAuth = true;
// sets the prefix to the server
$mail->SMTPSecure = "ssl";
// sets GMAIL as the SMTP server
$mail->Host = 'smtp.gmail.com';
// set the SMTP port
$mail->Port = '465';
// GMAIL username
$mail->Username = $from;
// GMAIL password
$mail->Password = $gmailPass;
$mail->From = $from;
$mail->FromName = $from;
$mail->AddReplyTo($from, $from);
$mail->Subject = 'This is a test!';
$mail->Body = $text;
$mail->MsgHTML($text);
$mail->IsHTML(true);
$mail->AddAddress($to, $to);
if(!$mail->Send()){
echo $mail->ErrorInfo;
}else{
echo 'sent!';
$mail->ClearAddresses();
$mail->ClearAttachments();
}
?>
EDIT: just tested and works fine. Make sure that the 3 files (class.phpmailer.php, class.pop3.php and class.smtp.php) are in the correct include path
Temelde, PHP mail()
fonksiyonu içerir:
<?php
mail(yourGmailAddress, object, message);
?>
Zaten Görüldüğü gibi, bu çözüm webserver bir posta sunucusu çalışır yalnızca çalışır. Bu e-posta sunucu bilinmeyen kullanıcıları yasaklayabilir. Yani (Ben bu durumda inanıyorum) o web / mail sunucusunda bir e-posta hesabınız olması gerekir. İkinci adım, daha sonra gmail hesabı size web sitesi adresinden posta iletmek için. Ben sizin gmail yapılandırması mümkün olduğundan% 90 eminim. Ayrıca web sitenizin posta yapılandırması mümkün olabilir. Ama her ikisi de yapılandırma yok!
Ayrıca form öğesi "eylem" özniteliği içine e-posta adresinizi koyabilirsiniz. Ama bu çok güvenilmez. Bu gibi:
<form method='post' action='mailto:your@email.com?Subject=Hello'>
...
</form>
Users must have email client installed and configured for this to work properly. There are some other drawbacks. You have to do some research to find whether this method is for you or not. http://www.google.com/search?client=opera&rls=en&q=form+action+mailto&sourceid=opera&ie=utf-8&oe=utf-8