Current location: Hot Scripts Forums » Programming Languages » PHP » PHP email form problem


PHP email form problem

Reply
  #1 (permalink)  
Old 06-17-05, 12:18 PM
jcwilde1 jcwilde1 is offline
New Member
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Cool PHP email form problem

I have a flash file which sends its info to my php file to send me an email. It worked great but now I switched to a linux server and it doesn't work. The hosting company said they can't send annonomous emails and I don't know php well at all but here is what I had:
<?
include_once("Mail\Mail.php");

$recipients = "josh@designfunk.com";
$headers["From"] = $_POST["email"];
$headers["To"] = "josh@designfunk.com";
$headers["Subject"] ="Designfunk Request";
$message = $_POST["message"]."\r\n\n";
$message .=$_POST["name"]."\r\n";
;
$message .=$_POST["phone"]."\r\n";
$params["host"] = "smtp.designfunk.com";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "josh@designfunk.com";
$params["password"] = "password";

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);
$mail_object->send($recipients, $headers, $message);
echo "Email sent."
?>

Pretty basic I think but I don't know why it doesn't work with my new server.
Any help would be greatly appreiciated,
Josh
Reply With Quote
  #2 (permalink)  
Old 06-17-05, 10:58 PM
jordie jordie is offline
Wannabe Coder
 
Join Date: Jun 2005
Posts: 179
Thanks: 0
Thanked 0 Times in 0 Posts
need to see the code from mail/mail.php
But, it may be that you can't send mail from php, as your host says....?
__________________
Jordie Bodlay
php, mysql, postgres
css, xhtml
graphics, design
email me: jb2386@hotmail.com for any programming needs.
Reply With Quote
  #3 (permalink)  
Old 06-18-05, 11:19 PM
jcwilde1 jcwilde1 is offline
New Member
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
that was a file from the old server as far as I know. The new server company directed me to this link and said to use this for my php mail.
http://pear.php.net/manual/en/package.mail.php
I have tried to figure it out, but my programming skills aren't that great and php is new to me. Does this mean anything to you??
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
PHP script problem (please help) osmanmumtaz PHP 0 05-24-05 07:29 AM
form to anyone's email with Image Verification ghostrider632 PHP 1 05-11-05 09:08 AM
Form Submission, PHP Coding Problem kibby67 PHP 3 12-02-04 01:13 PM


All times are GMT -5. The time now is 06:50 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.