if(!$mail->Send())
{
echo "<p>Message was not sent</p>";
echo "<p>Mailer Error: " . $mail->ErrorInfo."</p>";
echo "<p>Please notify admin at admin@scasp.com</p>";
}
else
{
echo "<p>Message has been sent, please allow 24 hours for you web site to be up, thank you.</p>";
}
I'm a deer hunter. I go all the time with my dad. One thing about deer, they have very good vision. One thing about me...I am better at hiding than they are at vision.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
thanks nogdog, man this is nice, but where do I upload the php class (I cant find the php.ini file on my server?
Thanks again...
Whenever I run the page I get an error of no class found.
K, uploaded the classto the same directory as the script, but now I get this error?
Mailer Error: Language string failed to load: connect_host
How do I get my smpt server (like how its something like this smpt.mail.com)
Thanks
Last edited by lukeurtnowski; 07-21-2006 at 02:16 PM.
I'm a deer hunter. I go all the time with my dad. One thing about deer, they have very good vision. One thing about me...I am better at hiding than they are at vision.
You need to tell it what smtp host to use, as well as your login name and password on it:
PHP Code:
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.email.com"; // SMTP server
$mail->Username = "login_name";
$mail->Password = "password";
Also, if the smtp port is not the usual port 25, you'll need to specify it with:
PHP Code:
$mail->Port = 33; // for example
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Hey how do I figure out my port (in canse its not 25?) and the name of my SMTP server?
PHP Code:
$mail->Host = "smtp.email.com"; // SMTP server
Thanks
Last edited by lukeurtnowski; 07-21-2006 at 04:03 PM.
I'm a deer hunter. I go all the time with my dad. One thing about deer, they have very good vision. One thing about me...I am better at hiding than they are at vision.
If you're already using a mail client to connect to it (Outlook, Thunderbird, etc.), all that stuff is in your settings. Otherwise you'll need to contact the hosting company to get that info if you don't have it. (If you have some sort of web site control panel page, there might be an option on it for "settings" or something similar that will lead you to that info.)
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Thanks
OH, I'm trying to send the email to my gmail account, but the host of the site knows what SMTP server I use.
Last edited by lukeurtnowski; 07-21-2006 at 04:43 PM.
I'm a deer hunter. I go all the time with my dad. One thing about deer, they have very good vision. One thing about me...I am better at hiding than they are at vision.
I'm a deer hunter. I go all the time with my dad. One thing about deer, they have very good vision. One thing about me...I am better at hiding than they are at vision.
Bookmarks