2016-05-03 16 views
-2

How to SMTP Einstellung auf WordPress, eigentlich http://snvenkataraman.com/ diese Website verschieben Hosting AWS Server.Use von Plugin-Kontaktformular 7 und WP Mail SMTP-Plugin, Kontaktformular nicht funktioniert? ! [] [2] meine E-Mail-Konfiguration ist:Wie kann die Einstellung SMTP-E-Mail auf Wordpress-Website

Von E-Mail: [email protected], Von Name: abc

Mailer:

Return Path: SMTP-Optionen

SMTP Host: smtp.gmail.com SMTP-Port: 25 Verschlüsselung: Authentifizierung: Benutzername: [email protected] Passwort: ****** Senden Sie einen Test E-Mail: [email protected]

+0

Wenn Sie Testmail über WP Mail SMTP Plugin senden, haben Sie diese Mail in Ihrem Posteingang erhalten? – purvik7373

Antwort

0

Sie können per Phpmail senden. Das ist der Code. Fügen Sie einfach Phpmailer-Datei im Stammverzeichnis hinzu.

<?php 
if (!isset($_SESSION)) { 
    session_start(); 
} 
include_once('class.phpmailer.php'); 
$first = @$_POST['name']; 
$last = @$_POST['last']; 
$email = @$_POST['email']; 
ob_start(); 
?> 
<table width="361" align="center" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #848484 thin; border-right:solid #848484 thin;"> 
    <tr> 
     <td colspan="2" align="center" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #84848``4 thin; border-right:solid #848484 thin;">Contact Form</td> 
    </tr> 
    <tr> 
     <td width="21" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #848484 thin; border-right:solid #848484 thin;"><span class="style3">First Name</span></td> 
     <td width="39" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #848484 thin; border-right:solid #848484 thin;"><span class="style3"><?php echo $first; ?></span></td> 
    </tr> 
    <?php if ($last == 0) { ?> 
    <?php } else { ?> 
     <tr> 
      <td width="21" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #848484 thin; border-right:solid #848484 thin;"><span class="style3">Last Name</span></td> 
      <td width="39" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #848484 thin; border-right:solid #848484 thin;"><span class="style3"><?php echo $last; ?></span> 
      </td> 
     </tr> 
    <?php } ?> 
    <tr> 
     <td width="21" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #848484 thin; border-right:solid #848484 thin;"><span class="style3">E-Mail</span></td> 
     <td width="39" style="border-bottom:solid #848484 thin; border-left:solid #848484 thin; border-top:solid #848484 thin; border-right:solid #848484 thin;"><span class="style3"><?php echo $email; ?></span></td> 
    </tr>  
</table> 
<?php 
$message = ob_get_clean(); 
$mail = new PHPMailer(); 
$mail->IsSMTP(); 
$mail->SMTPDebug = false; 
$mail->SMTPAuth = false; 
$mail->SetFrom('[email protected]', 'Example'); 
$mail->AddAddress('[email protected]'); 
$mail->Subject = "Call Back Request From example.com"; 
$mail->MsgHTML($message); 

if ($mail->Send()) 
    echo $mail = "Mail Sent!"; 
else 
    echo $mail = "There is an error while sending a mail:" . $mail->ErrorInfo; 
?>