Jump to content

Recommended Posts

I am positive this has something to do with the server it is on because when I test it on my server the script works. My php looks like this:

<?php 
$submit = $_POST['submit'];
$name = $_POST['namebox'];
$email = $_POST['emailbox'];
$comment = $_POST['commentbox'];
if($submit)
{
$confirm = "Thank you $name for your interest in Integrated Tool Solutions. We will contact you shortly.";
$content = "Name: $name\n";
$content .= "Email: $email\n";
$content .= "Comments:\n$comment";

$result1 = mail("$email","Thanks for your interest $name",$confirm);
$result2 = mail("ronnieatdopdotcom","ITS Inquiry from $name",$content);
if ($result1 && $result2) 
   {
   echo "&msgText=Message Sent";
   }
else
   {
   echo "&msgText=Message failed";  
   }
}
?>

 

So on their server im getting message failed whereas on my server it goes through just fine. I have access to their php ini file so if it something in their that I have to change what would it be? The server is running IIS on windows2k if that helps. Thanks.

-Ronnie

Link to comment
https://forums.phpfreaks.com/topic/64298-mail-function-not-working/
Share on other sites

reading some of these posts it seems the problem might be that the server doesn't have an smtp server? How would I set one up? I have total access to this server as I am on it through remote desktop. The ini file looks like this so far

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

I host my own site from my comptuer, but have never goten an smpt server to work (i think y isp blocks it)

 

In any case, you might want to use an external SMPT server for now.. try this:

 

Useraname: ???@gmail.com

password: ????

 

smtp server: mail.gmail.com

smtp port; 25

 

im not sure whree you put the username and password stuff, but it would be in the mail call php file.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.