/    Sign up×
Community /Pin to ProfileBookmark

zend is out, cant figure it out. phpmailer?

is this ok?

[code=php]

$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(“[email protected]”);

$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 [email protected]</p>”;
}
else
{
echo “<p>Message has been sent, please allow 24 hours for you web site to be up, thank you.</p>”;
}
[/code]

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 21.2006 — I believe this...
[code=php]
//add atttachments
AddAttachment($Image1_name);.
AddAttachment($Image2_name);.
AddAttachment($Image3_name);.
AddAttachment($Image4_name);.
AddAttachment($Image5_name);.
AddAttachment($Image6_name);.
[/code]

...should be this...
[code=php]
//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);
[/code]
Copy linkTweet thisAlerts:
@lukeurtnowskiauthorJul 21.2006 — 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
Copy linkTweet thisAlerts:
@NogDogJul 21.2006 — You need to tell it what smtp host to use, as well as your login name and password on it:
[code=php]
$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";
[/code]

Also, if the smtp port is not the usual port 25, you'll need to specify it with:
[code=php]
$mail->Port = 33; // for example
[/code]
Copy linkTweet thisAlerts:
@lukeurtnowskiauthorJul 21.2006 — Hey how do I figure out my port (in canse its not 25?) and the name of my SMTP server?
[code=php]
$mail->Host = "smtp.email.com"; // SMTP server
[/code]

Thanks
Copy linkTweet thisAlerts:
@NogDogJul 21.2006 — 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.)
Copy linkTweet thisAlerts:
@lukeurtnowskiauthorJul 21.2006 — I sen em a support ticket, but everything else is good?

Espeecially,
[code=php]
$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;
[/code]

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.
Copy linkTweet thisAlerts:
@lukeurtnowskiauthorJul 22.2006 — ok, got it, Now I get a different error

Mailer Error: Language string failed to load: [email][email protected][/email]
×

Success!

Help @lukeurtnowski spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...