Note that there are some explanatory texts on larger screens.

plurals
  1. POmail is not sent from IIS7 server, mail code written in php script
    text
    copied!<p>I am having IIS7 as my remote desktop, I have kept 5 websites in the server where three websites are made using .net framework and two using PHP,</p> <p>Mail sending code is written using SMTP authentication in all websites but mail is sent from websites developed using .net framework whereas mail is not sent from websites developed in php.</p> <p>Mail sending code written in php is below</p> <pre><code>&lt;?php $myname=$_POST['myname']; $email=$_POST['email']; $contact=$_POST['mob']; $mandap=$_POST['mandap']; $decor=$_POST['decoration']; $light=$_POST['light']; $photo=$_POST['photo']; $catering=$_POST['catering']; $travel=$_POST['travel']; $hotel=$_POST['hotel']; $volun=$_POST['volunteer']; $mehndi=$_POST['mehndi']; $others=$_POST['others']; $service=$mandap.', '.$decor.' ,'.$light.', '.$photo.', '.$catering.', '.$travel.', '.$hotel.' ,'.$volun.', '.$mehndi; require_once "Mail.php"; $from = "$myname &lt;$email&gt;"; $to = "info@domain.com"; //here i have written my domain name $subject = "Contact Details "; $body = "Intereted User Name: $myname\n\n Email id: $email\n\nContact No.: $contact\n\n Service needed: $service \n $others"; $host = "smtp.live.com"; $port = 25; $username = "info@domain.com"; $password = "password"; // info@domain.com mail password I have written $headers = array ('From' =&gt; $from, 'To' =&gt; $to,'Subject' =&gt; $subject); $smtp = Mail::factory('smtp', array ('host' =&gt; $host,'auth' =&gt; true, 'username' =&gt; $username, 'password' =&gt; $password,'port' =&gt; $port)); $mail = $smtp-&gt;send($to, $headers, $body); if (PEAR::isError($mail)) { echo("&lt;p&gt;" . $mail-&gt;getMessage() . "&lt;/p&gt;"); } else { header('location:index.php'); } ?&gt; </code></pre> <p>In my Remote desktop I configured the same as mentioned in the link below:</p> <pre><code> [http://hostedenvironments.net/support/support-mail/php-sendmail-on-iis/][1] </code></pre> <p>and</p> <pre><code> [http://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/configure-smtp-e-mail-in-iis-7-and-above][2] </code></pre> <p>but still mail is not sent I have spent about 5 hours working on it, well I am a newbie developer have no knowledge about server configuration.</p> <p>If any one can please help me in this it will be a great help.</p> <p>If any more information is required I can provide that too.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload