www.webdeveloper.com
Results 1 to 8 of 8

Thread: zend is out, cant figure it out. phpmailer?

  1. #1
    Join Date
    Aug 2004
    Posts
    192

    zend is out, cant figure it out. phpmailer?

    is this ok?
    PHP Code:
    ...
    $Who $_POST["Who"];

    // Obtain file upload vars
    $Image1      $_FILES['Image1']['tmp_name'];
    $Image1_type $_FILES['Image1']['type'];
    $Image1_name $_FILES['Image1']['name'];
    $Image2      $_FILES['Image2']['tmp_name'];
    $Image2_type $_FILES['Image2']['type'];
    $Image2_name $_FILES['Image2']['name'];
    $Image3      $_FILES['Image3']['tmp_name'];
    $Image3_type $_FILES['Image3']['type'];
    $Image3_name $_FILES['Image3']['name'];
    $Image4      $_FILES['Image4']['tmp_name'];
    $Image4_type $_FILES['Image4']['type'];
    $Image4_name $_FILES['Image4']['name'];
    $Image5      $_FILES['Image5']['tmp_name'];
    $Image5_type $_FILES['Image5']['type'];
    $Image5_name $_FILES['Image5']['name'];
    $Image6      $_FILES['Image6']['tmp_name'];
    $Image6_type $_FILES['Image6']['type'];
    $Image6_name $_FILES['Image6']['name'];

    if (isset(
    $Piercings)) {
    $Holes implode(", "$Piercings);
    }
    if (isset(
    $Services_Offered)) {
    $O_Service implode(", "$Services_Offered);
    }

    require(
    "class.phpmailer.php");

    $mail = new PHPMailer();

    $mail->IsSMTP(); // telling the class to use SMTP
    $mail->Host "smtp.email.com"// SMTP server

    $mail->From $ASP_Name;
    $mail->AddAddress("sdasp1admin@gmail.com");

    $mail->Subject "SDASP PROVIDER APPLICATION";

    $message "These are the values that a user has tried to submit<br />";
    $message .= '<form method=post action="http://testing.scasp.com/update_table_provider.php"><br />';
    $message .= 'ASP Real Name: <input type="text" name="Real_Name" value="' $Real_Name '"><br />';
    $message .= 'ASP Phone: <input type="text" name="ASP_Phone" value="' $ASP_Phone '"><br />';  
    $message .= 'Display Phone: <input type="text" name="Display_Phone" value="' $Display_Phone '"><br />';
    $message .= 'ASP Email: <input type="text" name="ASP_Email" value="' $ASP_Email '"><br />';
    $message .= 'Display Email: <input type="text" name="Display_Email" value="' $Display_Email '"><br />';
    $message .= 'ASP Website: <input type="text" name="Website" value="' $Website '"><br />';  
    $message .= 'ASP Website URL: <input type="text" name="Website_URL" value="' $Website_URL '"><br />';
    $message .= 'ASP Ethnicity: <input type="text" name="Ethnicity" value="' $Ethnicity '"><br />';
    $message .= 'ASP Age: <input type="text" name="Age" value="' $Age '"><br />';
    $message .= 'ASP Eye Color: <input type="text" size="40" name="Eye" value="' $Eye '"><br />';
    $message .= 'ASP Hair Color: <input type="text" name="Hair" value="' $Hair '"><br />';
    $message .= 'ASP Hair Length: <input type="text" name="Hair_Length" value="' $Hair_Length '"><br />';  
    $message .= 'ASP Bust: <input type="text" name="Bust " value="' $Bust '"><br />';
    $message .= 'ASP Cup Size: <input type="text" name="Cup" value="' $Cup '"><br />';
    $message .= 'Implants: <input type="text" name="Implants" value="' $Implants '"><br />';
    $message .= 'ASP Waist: <input type="text" name="Waist" value="' $Waist '"><br />';
    $message .= 'ASP Hips: <input type="text" name="Hips" value="' $Hips '"><br />';
    $message .= 'ASP Intimate Grooming: <input type="text" name="Grooming" value="' $Grooming '"><br />';
    $message .= 'ASP Piercings: <input type="text" size="40" name="Piercings" value="' $Holes '"><br />';
    $message .= 'ASP Tatoos: <input type="text" name="Tatoos" value="' $Tatoos '"><br />';
    $message .= 'On Time: <input type="text" name="On_Time" value="' $On_Time '"><br />';
    $message .= 'Hourly Rate: <input type="text" name="Hourly_Rate" value="' $Hourly_Rate '"><br />';
    $message .= 'Availibility: <input type="text" name="Availability" value="' $Availability '"><br />';
    $message .= 'Offered Service: <input type="text" name="Offered_Service" value="' $O_Service '"><br />';
    $message .= 'Rules: <input type="text" name="Rules" value="' .$Rules '"><br />';
    $message .= 'Reviews Available: <input type="text" name="Reviews" value="' $Reviews '"><br />';
    $message .= 'Review URL: <input type="text" name="Reviews_URL" value="' $Reviews_URL '"><br />';
    $message .= 'ASP Attire: <input type="text" name="Attire" value="' $Attire '"><br />';
    $message .= 'Who Am I: <input type="text" name="Who" value="' $Who '"><br />';
    $message .= 'Attachment 1: <input type="text" name="Image1" value="' $Image1 '"><br />';
    $message .= 'Attachment 2: <input type="text" name="Image2" value="' $Image2 '"><br />';
    $message .= 'Attachment 3: <input type="text" name="Image3" value="' $Image3 '"><br />';
    $message .= 'Attachment 4: <input type="text" name="Image4" value="' $Image4 '"><br />';
    $message .= 'Attachment 5: <input type="text" name="Image5" value="' $Image5 '"><br />';
    $message .= 'Attachment 6: <input type="text" name="Image6" value="' $Image6 '"><br />';

    $mail->Body $message;
    //add atttachments
    AddAttachment($Image1_name);.
    AddAttachment($Image2_name);.
    AddAttachment($Image3_name);.
    AddAttachment($Image4_name);.
    AddAttachment($Image5_name);.
    AddAttachment($Image6_name);.

    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.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    I believe this...
    PHP Code:
    //add atttachments
    AddAttachment($Image1_name);.
    AddAttachment($Image2_name);.
    AddAttachment($Image3_name);.
    AddAttachment($Image4_name);.
    AddAttachment($Image5_name);.
    AddAttachment($Image6_name);. 
    ...should be this...
    PHP Code:
    //add atttachments
    $this->AddAttachment($Image1_name);
    $this->AddAttachment($Image2_name);
    $this->AddAttachment($Image3_name);
    $this->AddAttachment($Image4_name);
    $this->AddAttachment($Image5_name);
    $this->AddAttachment($Image6_name); 
    "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

    eBookworm.us

  3. #3
    Join Date
    Aug 2004
    Posts
    192
    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.

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    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

    eBookworm.us

  5. #5
    Join Date
    Aug 2004
    Posts
    192
    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.

  6. #6
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    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

    eBookworm.us

  7. #7
    Join Date
    Aug 2004
    Posts
    192
    I sen em a support ticket, but everything else is good?
    Espeecially,
    PHP Code:
    $message .= 'ASP Attire: <input type="text" name="Attire" value="' $Attire '"><br />';
    $message .= 'Who Am I: <input type="text" name="Who" value="' $Who '"><br />';
    $message .= 'Attachment 1: <input type="text" name="Image1" value="' $Image1 '"><br />';
    $message .= 'Attachment 2: <input type="text" name="Image2" value="' $Image2 '"><br />';
    $message .= 'Attachment 3: <input type="text" name="Image3" value="' $Image3 '"><br />';
    $message .= 'Attachment 4: <input type="text" name="Image4" value="' $Image4 '"><br />';
    $message .= 'Attachment 5: <input type="text" name="Image5" value="' $Image5 '"><br />';
    $message .= 'Attachment 6: <input type="text" name="Image6" value="' $Image6 '"><br />';

    $mail->Body $message
    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.

  8. #8
    Join Date
    Aug 2004
    Posts
    192
    ok, got it, Now I get a different error
    Mailer Error: Language string failed to load: recipients_failedsdasp1admin@gmail.com
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles