English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi;
I have BSD Unix server and i have tried the code below using the localhost on my pc (winxp OS) and it is was successful but when i tried it using the unix server, it takes long time and at last did not send the mail (output the else part of the if st.==>Sorry... mail was not sent).
also i tried to remove all ini_set, but in this case the mail was not sent neither on localhost nor on the unix server.
==> the code is:
ini_set("sendmail_from", "sample@example.com");
ini_set("SMTP", "193.188.87.163");
ini_set ("sendmail_path","sendmail -t -i -F sample@example.com -f sample@example.com");
//I tried this instead of the line above ini_set ("sendmail_path", "/usr/sbin/sendmail -t -i");
ini_set("error_reporting", E_ALL);
$emailaddress="alaa@cmc-amman.gov.jo";
$emailsubject="TEST";
$msg="TEST Mail!";
$result = mail($emailaddress, $emailsubject, $msg);
ini_restore("sendmail_from");
if ($result)
Echo "Mail sent";
else
Echo "Sorry... mail was not sent";
?>

2007-03-19 23:25:29 · 4 answers · asked by alaa_alomari 1 in Computers & Internet Programming & Design

4 answers

The remote host might not allow you send email (is there any firewall running? rather is SMTP running on remote host)

2007-03-19 23:54:17 · answer #1 · answered by Anonymous · 0 0

Couple of items, is the BSD server 193.188.87.163. if not your are attempting to relay and generally that should not work (If the hosting company has any brains)

You will need to use your username and password (for the BSD server which may or may not be example.com).

Is this the correct path to sendmail on your BSD installation?

2007-03-20 01:57:05 · answer #2 · answered by Tracy L 7 · 0 0

do no longer use somewhat the course with thechronic letter, try the relative course. if t.very own residing house website is indoors the comparable folder as try.very own residing house website, try require(t.very own residing house website) If try.very own residing house website is indoors the htdocs folder, try require(/load/alley/t.very own residing house website) EDIT - final prognosis, you are able to desire to no longer use achronic letter indoors the course.

2016-10-19 03:48:11 · answer #3 · answered by ? 4 · 0 0

hei

try this one to sending smtp mails
http://www.phpclasses.org/browse/package/264.html



also you can find more here..just search for anything on php
http://www.phpclasses.org/search.html

2007-03-20 08:31:55 · answer #4 · answered by Rainierbay S 2 · 0 0

fedest.com, questions and answers