[PHP] Re: Mail Function In PHP

2010-03-07 Thread Al

Use the Pear Mail package. In particular the smtp class.

It will save you much grief and time.

On 3/6/2010 11:54 PM, Kannan wrote:

Hello
I am creating a application for our college using the
php.In that i want to send mail to all who are all the list.

For that i am just simply use the mail function in php without
configuring any mail system in the system.But the mail didn't send.
For sending the mails wat are requirements and if u have any tutorials
send it to me?

Thanks..












--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail() function HELP

2008-03-04 Thread Shawn McKenzie
Sofia Jacob (CA) wrote:
 I'm getting problems with the mail() function.
 
 ERROR: 
 
 Warning: mail() [function.mail]: Failed to connect to mailserver at  port 
 25, verify your SMTP and smtp_port setting in php.ini or use ini_set() in 
 C:\wamp\www\php_sandbox\user_auth_fns.php on line 170
 
 
 I'm using Windows XP prof. and WAMP5 -server 
 
 Here what I did: 
 
 1) I download sendmail.zip from http://glob.com.au/sendmail/
 
 2) I unzip this in a folder on c:\wamp\sendmail 
 
 3) I edited  PHP.INI file 
 
 [mail function]
 ; For Win32 only.
 SMTP = 
 smtp_port = 
 
 ; For Win32 only.
 ;sendmail_from =
 
 ; For Unix only.  You may supply arguments as well (default: sendmail -t 
 -i).
 ;sendmail_path = C:\wamp\sendmail\sendmail.exe -t
 
 ; Force the addition of the specified parameters to be passed as extra 
 parameters
 ; to the sendmail binary. These parameters will always replace the value of
 ; the 5th parameter to mail(), even in safe mode.
 ;mail.force_extra_parameters =
 
 4)I edited  SENDMAIL.INI file 
 
 ; configuration for fake sendmail
 
 ; if this file doesn't exist, sendmail.exe will look for the settings in
 ; the registry, under HKLM\Software\Sendmail
 
 [sendmail]
 
 ; you must change mail.mydomain.com to your smtp server,
 ; or to IIS's pickup directory.  (generally C:\Inetpub\mailroot\Pickup)
 ; emails delivered via IIS's pickup directory cause sendmail to
 ; run quicker, but you won't get error messages back to the calling
 ; application.
 
 smtp_server=mail.yahoo.ca
 
 ; smtp port (normally 25)
 
 smtp_port=465
 
 ; the default domain for this server will be read from the registry
 ; this will be appended to email addresses when one isn't provided
 ; if you want to override the value in the registry, uncomment and modify
 
 default_domain=
 
 ; log smtp errors to error.log (defaults to same directory as sendmail.exe)
 ; uncomment to enable logging
 
 error_logfile=error.log
 
 ; create debug log as debug.log (defaults to same directory as sendmail.exe)
 ; uncomment to enable debugging
 
 ;debug_logfile=debug.log
 
 ; if your smtp server requires authentication, modify the following two lines
 
 auth_username=jacobsofia
 auth_password= ***
 
 ; if your smtp server uses pop3 before smtp authentication, modify the 
 ; following three lines
 
 pop3_server=mail.yahoo.ca
 pop3_username= [EMAIL PROTECTED]
 pop3_password=**
 
 ; to force the sender to always be the following email address, uncomment and
 ; populate with a valid email address.  this will only affect the MAIL FROM
 ; command, it won't modify the From:  header of the message content
 
 [EMAIL PROTECTED]
 
 ; sendmail will use your hostname and your default_domain in the ehlo/helo
 ; smtp greeting.  you can manually set the ehlo/helo name if required
 
 hostname=
 
 
 5) Here my code: 
 
 $email = mysql_result($result, 0, email);
   $from = From: [EMAIL PROTECTED] \r\n;
   $mesg = Tu contraseña  ha sido cambiado a $Password \r\n
   .Por favor utilízalo la próxima cuando hagas log in. \r\n;
   if (mail($email, login información , $mesg, $from))
 echo Enviamos tu nueva contrasena a tu e-mail;
   else
 echo Error;
 
 Thanks for the help
 
 Sofia.

Number 1, in php.ini you left this uncommented so it's using this:
SMTP =
smtp_port =

Number 2, here you didn't uncomment the ;sendmail_path:
; For Unix only.  You may supply arguments as well (default: sendmail
-t -i).
;sendmail_path = C:\wamp\sendmail\sendmail.exe -t

Also, notice the *For Unix only.* comment.  Dunno if it will work anyway
if you have sendmail.

-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail function

2006-02-27 Thread Cristian MARIN
I don't know exactly if this problem belongs to this news forum. This is 
more or less a SMTP question.


The email servers names are kept into the mail MIME headers even if the 
message only passed through them and was then forwarded the servers 
names and IP's. This is done for anti-spam mesures, relay purposes, 
bouncing and other SMTP good reasons.

There are 3 ways to avoid this as far as I know:
1. To use internal networks relay servers with fake unroutable IP's like 
127.x.x.x or 192.168.x.x. However the IP address of the gateway is 
visible and this will work only in case of big networks.
2. To use so many email redirect servers that the MIME message beeing 
too long will start cutting the origins.
3. To connect to the relay server using a masquerading anonymous public 
server with squid or other proxy software running on it.


However this is not legal and I will advise to not use these methods. 
You may be considered a SPAM sender and be sued for these kind of actions.




Cristian MARIN - [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

Developer Designers Division
InterAKT Online - http://www.interaktonline.com


Mohsen Pahlevanzadeh wrote:


Dear all,
I wanna mail to x user that x  can't see my IP address.
Do you know same function?
--Mohsen




[PHP] Re: mail function-new line-security

2005-09-28 Thread A.J. Brown
I think you're thinking of spam injection through register_globals.  If 
so, yes it is vulnerable.

You need to force the variable data to come from the $_POST variable:

[code]

$name = $_POST['name'];
$phone = $_POST['phone'];
$user_mail = $_POST['user_mail'];
$my_email = $_POST['my_email'];

$usermailmsg =
This is the information you submitted.\n
If this is not correct, please contact us at mailto:$my_email.\n\n
Name: $name\n
Phone: $phone\n

...
Please feel free to write us with any comments or suggestions so that we may 
better serve you.\n
mailto:$my_email\n\n;;

mail($user_mail, $subject, $usermailmsg, $headers);

[/code]
-- 

Sincerely,

A.J. Brown


Peppy [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I have been working on making my contact forms more secure.  In my research, 
the occurence of the new line character \n at the end of the $headers 
variable in the  mail function seems to be a security risk and opens one up 
to injection of spam email.  This part I understand.  I have been unable to 
find out this same information about the message variable.

If I have a variable defining the message like this, can I use the new line 
character or am I opening myself up to more spam injection.

$usermailmsg =
This is the information you submitted.\n
If this is not correct, please contact us at mailto:$my_email.\n\n
Name: $name\n
Phone: $phone\n
...
Please feel free to write us with any comments or suggestions so that we may 
better serve you.\n
mailto:$my_email\n\n;;

mail($user_mail, $subject, $usermailmsg, $headers);

Thanks in advance for any help.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail function and qmail

2004-09-26 Thread M. Sokolewicz
Php Mysql wrote:
mail function in php requires to use 'sendmail'. But I have only
'qmail' on the box. How I can send email in PHP?
Thanks
just pretend it doesn't say sendmail but qmail. It works on both :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail function and qmail

2004-09-26 Thread Catalin Trifu
Php Mysql wrote:
mail function in php requires to use 'sendmail'. But I have only
'qmail' on the box. How I can send email in PHP?
Thanks
Hi,
   After u installed qmail, there is a qmail compatible sendmail 
created for you in /var/lib/qmail/bin (i think that's where it should be).
   As qmail docu' says y should copy or symlink this sendmail to the
/bin/sendmail or /usr/bin/sendmail on u'r system.
   Make sure u first backup u'r original sendmail.
   This should make PHP's mail stuff work as expected with qmail

hope this helps,
Catalin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail() function problem

2004-09-02 Thread Dre
is that mean that I don't really have to install any mail server or sendmail
prgram on my testing server??

Jasper Howard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 i use apache on my windows xp machine and have never gotten around to
 settings up any kind of sendmail program, I'm pretty sure you have to
 download one or atleast its some extra configuration.

 -- 


 --
 Jasper Howard :: Database Administration
 Velocity7
 1.530.470.9292
 http://www.Velocity7.com/
 --
 Dre [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I'm using an Apache server .. doesn't it come with a sendmail program ??
  I really don't know
 
  Jasper Howard [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   do you have a sendmail program on your testing server?
  
   -- 
  
  
   --
   Jasper Howard :: Database Administration
   Velocity7
   1.530.470.9292
   http://www.Velocity7.com/
   --
   Dre [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
Hi
I was trying to use the mail() function, but it did not work, maybe
   because
of some settings problem or something that I can't figure out
   
I went online and tried to execute the following
//===
  ?php
 $from = $_POST['from'];
 $subject = $_POST['subject'];
 $content = $_POST['content'];
 $to = [EMAIL PROTECTED];
   $headers = From:.$from;
 if(mail($to, $subject, $content, From: $from)) {
echosent;
}
 else{ echo not sent;
 }
 ?
//===
the variable values sent from a Form in another and they are sent
   correctly
   
but I keep having this error
//===
Warning: mail(): Failed to connect to mailserver at localhost port
 25,
verify your SMTP
and smtp_port setting in php.ini or use ini_set() in
C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on
line
  194
//===
   
   
my php.ini settings for the mail function are
   
//=
[mail function]
; For Win32 only.
SMTP = localhost
   
smtp_port = 25
sendmail_from = [EMAIL PROTECTED]
//=
   
thanks in advance
Dre,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function problem

2004-09-02 Thread Dre
Thank you Lone , I will try it out

Lone Wolf [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 What you need to do is set your SMTP server inside the php.ini file...


 [mail function]
 SMTP = smtp.server.com  ; for win32 only
 sendmail_from = [EMAIL PROTECTED] ; for win32 only
 ;sendmail_path = ;for unix only, may supply arguments as well ; (default
is
 sendmail -t)

 The test string I used to make sure my example worked:
 ?php
 print mail ('[EMAIL PROTECTED]',
 'No need for reply -- PHP test!', /* subject */
 hi JohnnLine 2n);/* body*/
 ?

 Robert

  -Original Message-
  From: Dre [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 01, 2004 6:48 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Re: mail() function problem
 
 
  Sorry .. but I'm really so new at this
  I'm using Apache Server on a MS Windows XP Pro. OS, and I'm
  trying to send a mail through a form .. what do I need to
  install or configure to be able to do this.
 
  thanks in advance
 
 
  Dre [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   I'm using an Apache server .. doesn't it come with a
  sendmail program
   ?? I really don't know
  
   Jasper Howard [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
do you have a sendmail program on your testing server?
   
--
   
   
--
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
http://www.Velocity7.com/
--
Dre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi
 I was trying to use the mail() function, but it did not work,
 maybe
because
 of some settings problem or something that I can't figure out

 I went online and tried to execute the following
 //===
   ?php
  $from = $_POST['from'];
  $subject = $_POST['subject'];
  $content = $_POST['content'];
  $to = [EMAIL PROTECTED];
$headers = From:.$from;
  if(mail($to, $subject, $content, From: $from)) {
 echosent;
 }
  else{ echo not sent;
  }
  ?
 //===
 the variable values sent from a Form in another and
  they are sent
correctly

 but I keep having this error
 //===
 Warning: mail(): Failed to connect to mailserver at localhost
 port
  25,
 verify your SMTP
 and smtp_port setting in php.ini or use ini_set() in
  C:\Program
 Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
   194
 //===


 my php.ini settings for the mail function are

 //=
 [mail function]
 ; For Win32 only.
 SMTP = localhost

 smtp_port = 25
 sendmail_from = [EMAIL PROTECTED] //=

 thanks in advance
 Dre,
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail() function problem

2004-09-01 Thread Jasper Howard
do you have a sendmail program on your testing server?

-- 


--
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
http://www.Velocity7.com/
--
Dre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi
 I was trying to use the mail() function, but it did not work, maybe
because
 of some settings problem or something that I can't figure out

 I went online and tried to execute the following
 //===
   ?php
  $from = $_POST['from'];
  $subject = $_POST['subject'];
  $content = $_POST['content'];
  $to = [EMAIL PROTECTED];
$headers = From:.$from;
  if(mail($to, $subject, $content, From: $from)) {
 echosent;
 }
  else{ echo not sent;
  }
  ?
 //===
 the variable values sent from a Form in another and they are sent
correctly

 but I keep having this error
 //===
 Warning: mail(): Failed to connect to mailserver at localhost port 25,
 verify your SMTP
 and smtp_port setting in php.ini or use ini_set() in
 C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194
 //===


 my php.ini settings for the mail function are

 //=
 [mail function]
 ; For Win32 only.
 SMTP = localhost

 smtp_port = 25
 sendmail_from = [EMAIL PROTECTED]
 //=

 thanks in advance
 Dre,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail() function problem

2004-09-01 Thread Dre
I'm using an Apache server .. doesn't it come with a sendmail program ??
I really don't know

Jasper Howard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 do you have a sendmail program on your testing server?

 -- 


 --
 Jasper Howard :: Database Administration
 Velocity7
 1.530.470.9292
 http://www.Velocity7.com/
 --
 Dre [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi
  I was trying to use the mail() function, but it did not work, maybe
 because
  of some settings problem or something that I can't figure out
 
  I went online and tried to execute the following
  //===
?php
   $from = $_POST['from'];
   $subject = $_POST['subject'];
   $content = $_POST['content'];
   $to = [EMAIL PROTECTED];
 $headers = From:.$from;
   if(mail($to, $subject, $content, From: $from)) {
  echosent;
  }
   else{ echo not sent;
   }
   ?
  //===
  the variable values sent from a Form in another and they are sent
 correctly
 
  but I keep having this error
  //===
  Warning: mail(): Failed to connect to mailserver at localhost port 25,
  verify your SMTP
  and smtp_port setting in php.ini or use ini_set() in
  C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
194
  //===
 
 
  my php.ini settings for the mail function are
 
  //=
  [mail function]
  ; For Win32 only.
  SMTP = localhost
 
  smtp_port = 25
  sendmail_from = [EMAIL PROTECTED]
  //=
 
  thanks in advance
  Dre,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail() function problem

2004-09-01 Thread Dre
Sorry .. but I'm really so new at this
I'm using Apache Server on a MS Windows XP Pro. OS, and I'm trying to send a
mail through a form ..
what do I need to install or configure to be able to do this.

thanks in advance


Dre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm using an Apache server .. doesn't it come with a sendmail program ??
 I really don't know

 Jasper Howard [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  do you have a sendmail program on your testing server?
 
  -- 
 
 
  --
  Jasper Howard :: Database Administration
  Velocity7
  1.530.470.9292
  http://www.Velocity7.com/
  --
  Dre [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Hi
   I was trying to use the mail() function, but it did not work, maybe
  because
   of some settings problem or something that I can't figure out
  
   I went online and tried to execute the following
   //===
 ?php
$from = $_POST['from'];
$subject = $_POST['subject'];
$content = $_POST['content'];
$to = [EMAIL PROTECTED];
  $headers = From:.$from;
if(mail($to, $subject, $content, From: $from)) {
   echosent;
   }
else{ echo not sent;
}
?
   //===
   the variable values sent from a Form in another and they are sent
  correctly
  
   but I keep having this error
   //===
   Warning: mail(): Failed to connect to mailserver at localhost port
25,
   verify your SMTP
   and smtp_port setting in php.ini or use ini_set() in
   C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
 194
   //===
  
  
   my php.ini settings for the mail function are
  
   //=
   [mail function]
   ; For Win32 only.
   SMTP = localhost
  
   smtp_port = 25
   sendmail_from = [EMAIL PROTECTED]
   //=
  
   thanks in advance
   Dre,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail() function problem

2004-09-01 Thread Jasper Howard
i use apache on my windows xp machine and have never gotten around to
settings up any kind of sendmail program, I'm pretty sure you have to
download one or atleast its some extra configuration.

-- 


--
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
http://www.Velocity7.com/
--
Dre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm using an Apache server .. doesn't it come with a sendmail program ??
 I really don't know

 Jasper Howard [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  do you have a sendmail program on your testing server?
 
  -- 
 
 
  --
  Jasper Howard :: Database Administration
  Velocity7
  1.530.470.9292
  http://www.Velocity7.com/
  --
  Dre [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Hi
   I was trying to use the mail() function, but it did not work, maybe
  because
   of some settings problem or something that I can't figure out
  
   I went online and tried to execute the following
   //===
 ?php
$from = $_POST['from'];
$subject = $_POST['subject'];
$content = $_POST['content'];
$to = [EMAIL PROTECTED];
  $headers = From:.$from;
if(mail($to, $subject, $content, From: $from)) {
   echosent;
   }
else{ echo not sent;
}
?
   //===
   the variable values sent from a Form in another and they are sent
  correctly
  
   but I keep having this error
   //===
   Warning: mail(): Failed to connect to mailserver at localhost port
25,
   verify your SMTP
   and smtp_port setting in php.ini or use ini_set() in
   C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
 194
   //===
  
  
   my php.ini settings for the mail function are
  
   //=
   [mail function]
   ; For Win32 only.
   SMTP = localhost
  
   smtp_port = 25
   sendmail_from = [EMAIL PROTECTED]
   //=
  
   thanks in advance
   Dre,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function problem

2004-09-01 Thread Pahlevanzadeh Mohsen
Please switch to a UNIX box.For example Fedora.
Because it has everythings that you need.
--- Dre [EMAIL PROTECTED] wrote:

 I'm using an Apache server .. doesn't it come with a
 sendmail program ??
 I really don't know
 
 Jasper Howard [EMAIL PROTECTED] wrote in
 message
 news:[EMAIL PROTECTED]
  do you have a sendmail program on your testing
 server?
 
  -- 
 
 
 

--
  Jasper Howard :: Database Administration
  Velocity7
  1.530.470.9292
  http://www.Velocity7.com/
 

--
  Dre [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Hi
   I was trying to use the mail() function, but it
 did not work, maybe
  because
   of some settings problem or something that I
 can't figure out
  
   I went online and tried to execute the following
  

//===
 ?php
$from = $_POST['from'];
$subject = $_POST['subject'];
$content = $_POST['content'];
$to = [EMAIL PROTECTED];
  $headers = From:.$from;
if(mail($to, $subject, $content, From:
 $from)) {
   echosent;
   }
else{ echo not sent;
}
?
  
 //===
   the variable values sent from a Form in another
 and they are sent
  correctly
  
   but I keep having this error
  
 //===
   Warning: mail(): Failed to connect to mailserver
 at localhost port 25,
   verify your SMTP
   and smtp_port setting in php.ini or use
 ini_set() in
   C:\Program Files\Apache
 Group\Apache2\htdocs\mysite/myfile.php on line
 194
  
 //===
  
  
   my php.ini settings for the mail function are
  
   //=
   [mail function]
   ; For Win32 only.
   SMTP = localhost
  
   smtp_port = 25
   sendmail_from = [EMAIL PROTECTED]
   //=
  
   thanks in advance
   Dre,
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator   programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function problem

2004-09-01 Thread Pahlevanzadeh Mohsen
If you use Windows as your server,You must install
M$Exchange server.It is a mailserver under Windows.
Of course,If you want to install Linux,I can help u.
It has benefit for u.
Even i made a group on yahoo phplovers.
You can join to my group  will get help.
It has 56 members.
My email address is 
m_pahlevanzadeh at yahoo dot com
If you have a question on Linux,I can help u.
But it is your chioce...Linux or Windows.
When you develop under windows,You must upload it to
an UNIX box.May be you will have problem.
Please start with Linux as your OS.
Yours,Mohsen
--- Dre [EMAIL PROTECTED] wrote:

 Sorry .. but I'm really so new at this
 I'm using Apache Server on a MS Windows XP Pro. OS,
 and I'm trying to send a
 mail through a form ..
 what do I need to install or configure to be able to
 do this.
 
 thanks in advance
 
 
 Dre [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I'm using an Apache server .. doesn't it come with
 a sendmail program ??
  I really don't know
 
  Jasper Howard [EMAIL PROTECTED] wrote in
 message
  news:[EMAIL PROTECTED]
   do you have a sendmail program on your testing
 server?
  
   -- 
  
  
  

--
   Jasper Howard :: Database Administration
   Velocity7
   1.530.470.9292
   http://www.Velocity7.com/
  

--
   Dre [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
Hi
I was trying to use the mail() function, but
 it did not work, maybe
   because
of some settings problem or something that I
 can't figure out
   
I went online and tried to execute the
 following
   

//===
  ?php
 $from = $_POST['from'];
 $subject = $_POST['subject'];
 $content = $_POST['content'];
 $to = [EMAIL PROTECTED];
   $headers = From:.$from;
 if(mail($to, $subject, $content, From:
 $from)) {
echosent;
}
 else{ echo not sent;
 }
 ?
   
 //===
the variable values sent from a Form in
 another and they are sent
   correctly
   
but I keep having this error
   
 //===
Warning: mail(): Failed to connect to
 mailserver at localhost port
 25,
verify your SMTP
and smtp_port setting in php.ini or use
 ini_set() in
C:\Program Files\Apache
 Group\Apache2\htdocs\mysite/myfile.php on line
  194
   
 //===
   
   
my php.ini settings for the mail function are
   
//=
[mail function]
; For Win32 only.
SMTP = localhost
   
smtp_port = 25
sendmail_from = [EMAIL PROTECTED]
//=
   
thanks in advance
Dre,
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator   programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: mail() function problem

2004-09-01 Thread Lone Wolf
What you need to do is set your SMTP server inside the php.ini file...


[mail function] 
SMTP = smtp.server.com  ; for win32 only 
sendmail_from = [EMAIL PROTECTED] ; for win32 only 
;sendmail_path = ;for unix only, may supply arguments as well ; (default is
sendmail -t) 

The test string I used to make sure my example worked: 
?php
print mail ('[EMAIL PROTECTED]', 
'No need for reply -- PHP test!', /* subject */
hi JohnnLine 2n);/* body*/
?

Robert

 -Original Message-
 From: Dre [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 01, 2004 6:48 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: mail() function problem
 
 
 Sorry .. but I'm really so new at this
 I'm using Apache Server on a MS Windows XP Pro. OS, and I'm 
 trying to send a mail through a form .. what do I need to 
 install or configure to be able to do this.
 
 thanks in advance
 
 
 Dre [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  I'm using an Apache server .. doesn't it come with a 
 sendmail program 
  ?? I really don't know
 
  Jasper Howard [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
   do you have a sendmail program on your testing server?
  
   --
  
  
   --
   Jasper Howard :: Database Administration
   Velocity7
   1.530.470.9292
   http://www.Velocity7.com/
   --
   Dre [EMAIL PROTECTED] wrote in message 
   news:[EMAIL PROTECTED]
Hi
I was trying to use the mail() function, but it did not work, 
maybe
   because
of some settings problem or something that I can't figure out
   
I went online and tried to execute the following 
//===
  ?php
 $from = $_POST['from'];
 $subject = $_POST['subject'];
 $content = $_POST['content'];
 $to = [EMAIL PROTECTED];
   $headers = From:.$from;
 if(mail($to, $subject, $content, From: $from)) {
echosent;
}
 else{ echo not sent;
 }
 ?
//===
the variable values sent from a Form in another and 
 they are sent
   correctly
   
but I keep having this error 
//===
Warning: mail(): Failed to connect to mailserver at localhost 
port
 25,
verify your SMTP
and smtp_port setting in php.ini or use ini_set() in 
 C:\Program 
Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
  194
//===
   
   
my php.ini settings for the mail function are
   
//=
[mail function]
; For Win32 only.
SMTP = localhost
   
smtp_port = 25
sendmail_from = [EMAIL PROTECTED] //=
   
thanks in advance
Dre,
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Mail Function

2004-03-08 Thread Will
Please help me with this.  Can someone give me an example of their 
php.ini on the settings of the mail function.

~WILL~

Will wrote:
Hello All,
I have a question.  I installed PHP on a windows XP machine.
When I try to send a form it says:
Warning: mail(): sendmail_from not set in php.ini or custom From: header.
My header are as follows:
?
require (admin/inc/setup.php);
$subject = FeedBack From Site;

$msg = Senders Name:   $_POST[name]\n;
$msg .= Senders Email: $_POST[email]\n;
$msg .= Message:   \r$_POST[message]\n;
$mailheader .= From:   $_POST[email]\n;
$mailheader .= A message has been sent from Domain;
mail($recipient, $subject, $msg, $mailheader);

require (tmpl/send_form.htm);
?
The recipient is in the setup.php file, just to let you know.

My sendmail_from is as follows:
sendmail_from = [EMAIL PROTECTED]
Please help :)

~WILL~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Mail Function

2004-03-08 Thread Tom Rogers
Hi,

Tuesday, March 9, 2004, 12:05:22 AM, you wrote:
W Please help me with this.  Can someone give me an example of their 
W php.ini on the settings of the mail function.

W ~WILL~


A wild guess but try it with \r\n as line endings, I don't run the
server under windows so can't help with the ini settings.
-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Mail Function

2004-03-08 Thread Stuart
Will wrote:
My sendmail_from is as follows:
sendmail_from = [EMAIL PROTECTED]
Did you restart Apache (assuming you're using the module) after making 
this change?

--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Mail function problem

2004-01-10 Thread Jonas
Rolf Berkenbosch wrote:
 Hi All,
  
 I have a big problem with the mail function in PHP.
 I have installed PHP 4.3.3. But no email where send
 With the mail function. If I run this script as root. There
 Is no problem..
  
 What do I need to change??
  
 Thanks,
  
 Rolf

hm I think the webserver or the user who is running the PHP Script has no 
access/execute rights for the Mailserver..

Greetings, Veers
and sry for my bad english...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Mail function problem

2004-01-10 Thread Manuel Lemos
Hello,

On 01/10/2004 11:36 AM, Rolf Berkenbosch wrote:
I have a big problem with the mail function in PHP.
I have installed PHP 4.3.3. But no email where send
With the mail function. If I run this script as root. There
Is no problem..
 
What do I need to change??
Which platform as you using, Windows ou Linux/Unix? Did you configure 
PHP to send messages properly?

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail function error - win32

2003-11-01 Thread Manuel Lemos
Hello,

On 11/01/2003 07:10 PM, [EMAIL PROTECTED] wrote:
I try to send from my pc a mail with the function mail(), but if doesn't work, I have tried several time, but nothing, I don't know what could be, because the same script work well in a remote host.
You need to specify valid sender and recipient addresses. If you still 
have problems, you may want to try this class that has workarounds for 
some of the problems of the mail() function:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: mail() function, how to get it work?

2003-10-06 Thread Burhan Khalid
Manuel Lemos wrote:

Hello,

On 10/03/2003 12:44 PM, Kristian Snabb wrote:

How do I set up the mail() function in php.ini.
How do I define the username and password? My smtp service requires me 
to log on.

I'm using Apache 2.0.47 on WinXP Pro.


There is no way to set SMTP authentication using the mail() function.
Since you are one WinXP Pro -- you can download something like postcast 
http://www.postcast.com (a free SMTP server), and use that instead.

However, the original statement is correct ... mail() doesn't support 
SMTP authentication.

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail() function, how to get it work?

2003-10-03 Thread Manuel Lemos
Hello,

On 10/03/2003 12:44 PM, Kristian Snabb wrote:
How do I set up the mail() function in php.ini.
How do I define the username and password? My smtp service requires me 
to log on.

I'm using Apache 2.0.47 on WinXP Pro.
There is no way to set SMTP authentication using the mail() function.

You may want to use this class that comes with a wrapper function named 
smtp_mail() that works exactly like the mail() function but lets you 
configure certain SMTP delivery details such as authentication credentials:

http://www.phpclasses.org/mimemessage

You will also need this:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail function

2003-09-12 Thread Curt Zirzow
On Thu, 11 Sep 2003 11:24:29 +0545, Deependra B. Tandukar 
[EMAIL PROTECTED] wrote:

Dear all,

Recently installed PHP in my Linux server. It says, mail function is not 
enabled? How is turn this on?
That means that the configure script couldn't find your sendmail program.  
You
need to tell configure where your sendmail is or put sendmail in a standard 
location like in /usr/bin/

HTH,
curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail function

2003-09-11 Thread Kae Verens
Deependra B. Tandukar wrote:
Dear all,

Recently installed PHP in my Linux server. It says, mail function is not 
enabled? How is turn this on?
mail is handled by the server's smtp program. In Linux, this is 
sendmail, and should be installed by default. Haven't a clue about 
Windows (I don't do windows).

check for SMTP on the server (assuming Linux) by using the mail command 
in the console to send yourself a test email (man mail for help)

Kae

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail function

2003-09-11 Thread David
If you are doing Windows, you set up SMTP in the php.ini to your mail
server, mine is SMTP = 192.168.16.2, and I also set up
sendmail_from = [EMAIL PROTECTED]

-- 
Kind Regards

David
Anagram Systems
http://www.anagram-sys.co.uk/
http://www.web-planets.com/davec/techsitedb/


Deependra B. Tandukar [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Dear all,

 Recently installed PHP in my Linux server. It says, mail function is not
 enabled? How is turn this on?

 Regards,
 _DT

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail() function failure

2003-08-11 Thread Ivo Fokkema
Brad Esclavon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have made a simple script to mail an email to a person on my domain. i
 have tested the script with different values and i still cannot get the
 email. when i execute the mail function, it returns true, so i know it
gets
 to the mail server, but the mail server doesnt actually send it. i am
being
 hosted by a company and am sure the mail server is up and working for me.
is
 there a way i need to feed it a username/password with php? any ideas on
why
 its not working? im completely stumped.

 ?php

  ini_set(SMTP,smtp-relay.affinity.com);

  $mail_to = [EMAIL PROTECTED];
  $mail_from = [EMAIL PROTECTED];
  $mail_subject = php mail test;
  $mail_body = test;

  if ( mail($mail_to, $mail_subject, $mail_body))
{echo(sucess);}
  else
{echo(fail);}

 ?
Brad, you're missing a buch of headers probably causing your email to be
dropped somewhere regarded spam (especially Hotmail is quite picky about the
headers).

Try and send these headers (fourth argument in mail() function.

$headers = MIME-Version: 1.0\r\n;
$headers .= Content-Type: text/plain; charset=iso-8859-1\r\n;
$headers .= X-Priority: 3\r\n;
$headers .= X-MSMail-Priority: Normal\r\n;
$headers .= X-Mailer: PHP/.phpversion().\r\n;//I use this, I'm not
sure if you really need this header
$headers .= From: [EMAIL PROTECTED];
$headers .= Reply-to: [EMAIL PROTECTED];
$headers .= Return-path: [EMAIL PROTECTED];
$headers .= Error-to: [EMAIL PROTECTED];

if (mail($mail_to, $mail_subject, $mail_body,$headers)) {
  echo (success);
} else {
  echo (failed);
}

HTH,

--
Ivo Fokkema
PHP  MySQL programmer
Leiden University Medical Centre
Netherlands



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail function

2003-07-21 Thread Ivo Fokkema
 I put this PHP script on web server:

 ?php
  if (mail([EMAIL PROTECTED], brati, peda, From: Peda)== TRUE)
 print(U redu je);
  else
 print(Greska);
 ?

 But It seems that mail function doesn't work. I don't get any e-mail.

 Can anyone tell me what is wrong.

Does mail() return true? I mean, do you get printed U redu je? If so, your
email should've been sent by PHP.

You are really missing a bunch of headers. I'm not sure if this is your
problem, but I think it's not a bad idea to include more headers, also
because more and more ISP's add some kind of spamfilter which might drop
your email. So maybe by adding more headers, you can solve this.

I use this:

$headers = MIME-Version: 1.0\r\n;
$headers .= Content-Type: text/plain; charset=iso-8859-1\r\n;
$headers .= X-Priority: 3\r\n;
$headers .= X-MSMail-Priority: Normal\r\n;
$headers .= X-Mailer: PHP/.phpversion().\r\n;
$headers .= From: Name [EMAIL PROTECTED]\r\n;

$body = Whatever is in your email;

$to = Name [EMAIL PROTECTED];
$check_mail = mail($to, Subject, $body, $headers);

--
[Win2000 | Apache/1.3.23]
[PHP/4.2.3 | MySQL/3.23.53]

Ivo Fokkema
PHP  MySQL programmer
Leiden University Medical Centre
Netherlands



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail function

2003-07-21 Thread Chris Hayes
At 10:39 21-7-03, you wrote:
 I put this PHP script on web server:

 ?php
  if (mail([EMAIL PROTECTED], brati, peda, From: Peda)== TRUE)
 print(U redu je);
  else
 print(Greska);
 ?

 But It seems that mail function doesn't work. I don't get any e-mail.

 Can anyone tell me what is wrong.
Does mail() return true? I mean, do you get printed U redu je? If so, your
email should've been sent by PHP.
You are really missing a bunch of headers. I'm not sure if this is your
problem, but I think it's not a bad idea to include more headers, also
because more and more ISP's add some kind of spamfilter which might drop
your email. So maybe by adding more headers, you can solve this.
I use this:

$headers = MIME-Version: 1.0\r\n;
$headers .= Content-Type: text/plain; charset=iso-8859-1\r\n;
$headers .= X-Priority: 3\r\n;
$headers .= X-MSMail-Priority: Normal\r\n;
$headers .= X-Mailer: PHP/.phpversion().\r\n;
$headers .= From: Name [EMAIL PROTECTED]\r\n;
$body = Whatever is in your email;

$to = Name [EMAIL PROTECTED];
$check_mail = mail($to, Subject, $body, $headers);
When PHP sends an email to a non existing email address such as 
[EMAIL PROTECTED], the warning mail you normally get returned often does not 
arrive in your mailbox. Therefore I add two additional headers:

.Reply-To: [EMAIL PROTECTED]
.Return-path: [EMAIL PROTECTED]
and now I do get the notification mail when mail bounces.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail function

2003-07-21 Thread Peda
Thank you!!!
Headers solved my problem.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail function

2003-07-21 Thread Ivo Fokkema
 Does mail() return true? I mean, do you get printed U redu je? If so,
your
 email should've been sent by PHP.
 
 You are really missing a bunch of headers. I'm not sure if this is your
 problem, but I think it's not a bad idea to include more headers, also
 because more and more ISP's add some kind of spamfilter which might drop
 your email. So maybe by adding more headers, you can solve this.
 
 I use this:
 
 $headers = MIME-Version: 1.0\r\n;
 $headers .= Content-Type: text/plain; charset=iso-8859-1\r\n;
 $headers .= X-Priority: 3\r\n;
 $headers .= X-MSMail-Priority: Normal\r\n;
 $headers .= X-Mailer: PHP/.phpversion().\r\n;
 $headers .= From: Name [EMAIL PROTECTED]\r\n;
 
 $body = Whatever is in your email;
 
 $to = Name [EMAIL PROTECTED];
 $check_mail = mail($to, Subject, $body, $headers);

 When PHP sends an email to a non existing email address such as
 [EMAIL PROTECTED], the warning mail you normally get returned often does not
 arrive in your mailbox. Therefore I add two additional headers:

  .Reply-To: [EMAIL PROTECTED]
  .Return-path: [EMAIL PROTECTED]

 and now I do get the notification mail when mail bounces.
That's funny, because I always had that problem, too. By adding Reply-To and
Return-path, it did not fix my problem. Boucing emails never got back to me.
Return-path was overwritten by my hostingserver to '[EMAIL PROTECTED]' and Reply-To
was apparently ignored by the server bouncing the email. Do you think
servers differ in this a lot?

--
[Win2000 | Apache/1.3.23]
[PHP/4.2.3 | MySQL/3.23.53]

Ivo Fokkema
PHP  MySQL programmer
Leiden University Medical Centre
Netherlands



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail function

2003-07-21 Thread Curt Zirzow
* Thus wrote Ivo Fokkema ([EMAIL PROTECTED]):
  Does mail() return true? I mean, do you get printed U redu je? If so,
 
  When PHP sends an email to a non existing email address such as
  [EMAIL PROTECTED], the warning mail you normally get returned often does not
  arrive in your mailbox. Therefore I add two additional headers:
 
   .Reply-To: [EMAIL PROTECTED]
   .Return-path: [EMAIL PROTECTED]
 
  and now I do get the notification mail when mail bounces.
 That's funny, because I always had that problem, too. By adding Reply-To and
 Return-path, it did not fix my problem. Boucing emails never got back to me.
 Return-path was overwritten by my hostingserver to '[EMAIL PROTECTED]' and Reply-To
 was apparently ignored by the server bouncing the email. Do you think
 servers differ in this a lot?

So much confusion on mail.

Return-Path: inserted by all smtp servers on delivery.
Reply-To:handled by client
Errors-To:   Maybe handled by smtp server.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function exchange

2003-06-13 Thread Manuel Lemos
Hello,

On 06/12/2003 02:32 PM, Diana wrote:
I totally agree with your first sentence *grin*.
Anyways, I won`t be able to use your class because my
server is kind of locked in their network, meaning I
don`t have the possibility to connect outside, only to
their servers (NT servers). And as Exchange servers
don`t use SMTP (meaning the whole protocol is NOT
used, so your classes won`t help me), I`m not able to
send mails at all. Only like he offered me to put an
extra box in the network which will relay the mails
from my linux server. 
That will do.


Does anyone know about the way exchange servers work,
mapi and mapisend? The only thing I found was how to
program that in VB (and being able to talk to Exchange
servers), but it seems like this is not possible for
my penguin :) (VB on Linux??? sounds stupid)
No, that will not work on Linux because you do not have COM object 
support, which is a Windows thing.

--

Regards,
Manuel Lemos


just today I stumbled into the same problem. It is
true, I got this answer from an expert:

Unfortunately this will not work.  SMTP relaying
is

disabled on all the
Exchange connector servers and a standard Exchange
mailbox server does 
not
support SMTP.  The only way that you can send SMTP
email from within 
our company is to use the Internal MailSweeper. 
And

to allow this we need 
the IP
Address of the box that will be sending the
messages

so that we can 
include
it in the authenticated list.  We have to have
things

set up this way 
for
Security reasons.

One other thing I should have mentioned.  Outlook
uses

mapi to send on 
the
Exchange servers.  So we can use the mapisend
command

but I do not know 
if
your application would support this.  I think that
this may also need a
valid Outlook profile to work.

I don`t understand that either, because I am
trying to

use my Linux server (inside my companys network)
to

deliver mails to the exchange server via sendmail.

If anyone knows more about this topic, let me
know.sorry that this obviously does not belong
to

a php list, but I deleted the original email 
could

not find the email address of the author of this
topic

:(
I wonder about his expertise. Authentication was
meant for security reasons.
Anyway, you do no not need to relay in the company
SMTP server unless 
outside access is blocked in some firewall.

If you are using Linux, you just need to use the
mail() function because 
it just uses sendmail by default.

If you still have problems, just use the classes
that I mentioned 
enabling direct delivery mode in the SMTP sending
attributes. That does 
the same as sendmail but at least if it fails you
can enable debugging 
to see what the SMTP protocol dialog reveals.




--- Manuel Lemos [EMAIL PROTECTED] schrieb: 
Hello,

On 06/10/2003 04:44 PM, Matthias Wulkow wrote:


a friend of mine is trying to set up an automated
mailing function.


The platform is Windows  he's using the last PHP
release at this


time.
He asks me how to do it with Exchange, because it
doesn't speak SMTP


or not correctly? What is the matter? Is that
true? But that's not


really the question... could somebody point me to
some documents where


I could find out, what has to be done to make it
work?

I do not see what he means by not speaking SMTP
correctly. Anyway, if it 
receives e-mail that you get, it also can relay
messages that you send. 
I think in the worst case you need to
authenticate.

In that case you may want to try this class for
composing and sending 
messages. It comes with a sub class for sending
messages via SMTP that 
supports authentication.

http://www.phpclasses.org/mimemessage

You also need this class for the actual message
delivery:
http://www.phpclasses.org/smtpclass


--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: mail() function exchange

2003-06-12 Thread Diana
I totally agree with your first sentence *grin*.
Anyways, I won`t be able to use your class because my
server is kind of locked in their network, meaning I
don`t have the possibility to connect outside, only to
their servers (NT servers). And as Exchange servers
don`t use SMTP (meaning the whole protocol is NOT
used, so your classes won`t help me), I`m not able to
send mails at all. Only like he offered me to put an
extra box in the network which will relay the mails
from my linux server. 
Does anyone know about the way exchange servers work,
mapi and mapisend? The only thing I found was how to
program that in VB (and being able to talk to Exchange
servers), but it seems like this is not possible for
my penguin :) (VB on Linux??? sounds stupid)
I found in old archives of this mailinglist that some
people asked this question before (how to implement a
mail function for exchange servers in php) but no one
knew it. One hint was to use ldap. anyone any idea
about this? ANY help is appreciated, I will follow the
threads started about ldap but right now it does not
look like it has a lot to do with the mail stuff. 

Another hint might be the COM interface (I saw VB code
they used this) but php offers only very few things on
this and as I have no idea of microsofts concepts that
doesn`t help :(

Please email me for suggestions!!! Wold be great to
implement something new in php ;). If anyone knows
documents about how outlook  exchange work I would
like to see them! Thanks :)
Diana 



 --- Manuel Lemos [EMAIL PROTECTED] schrieb:  Hello,
 
 On 06/11/2003 05:38 PM, Diana wrote:
  Hi, 
  just today I stumbled into the same problem. It is
  true, I got this answer from an expert:
 
  Unfortunately this will not work.  SMTP relaying
 is
  disabled on all the
  Exchange connector servers and a standard Exchange
  mailbox server does 
  not
  support SMTP.  The only way that you can send SMTP
  email from within 
  our company is to use the Internal MailSweeper. 
 And
  to allow this we need 
  the IP
  Address of the box that will be sending the
 messages
  so that we can 
  include
  it in the authenticated list.  We have to have
 things
  set up this way 
  for
  Security reasons.
  
  One other thing I should have mentioned.  Outlook
 uses
  mapi to send on 
  the
  Exchange servers.  So we can use the mapisend
 command
  but I do not know 
  if
  your application would support this.  I think that
  this may also need a
  valid Outlook profile to work.
  
  
  I don`t understand that either, because I am
 trying to
  use my Linux server (inside my companys network)
 to
  deliver mails to the exchange server via sendmail.
 
  If anyone knows more about this topic, let me
  know.sorry that this obviously does not belong
 to
  a php list, but I deleted the original email 
 could
  not find the email address of the author of this
 topic
  :(
 
 I wonder about his expertise. Authentication was
 meant for security reasons.
 
 Anyway, you do no not need to relay in the company
 SMTP server unless 
 outside access is blocked in some firewall.
 
 If you are using Linux, you just need to use the
 mail() function because 
 it just uses sendmail by default.
 
 If you still have problems, just use the classes
 that I mentioned 
 enabling direct delivery mode in the SMTP sending
 attributes. That does 
 the same as sendmail but at least if it fails you
 can enable debugging 
 to see what the SMTP protocol dialog reveals.
 
 
 
   --- Manuel Lemos [EMAIL PROTECTED] schrieb: 
 Hello,
  
 On 06/10/2003 04:44 PM, Matthias Wulkow wrote:
 
 a friend of mine is trying to set up an automated
 
 mailing function.
 
 The platform is Windows  he's using the last PHP
 
 release at this
 
 time.
 He asks me how to do it with Exchange, because it
 
 doesn't speak SMTP
 
 or not correctly? What is the matter? Is that
 
 true? But that's not
 
 really the question... could somebody point me to
 
 some documents where
 
 I could find out, what has to be done to make it
 
 work?
 
 I do not see what he means by not speaking SMTP
 correctly. Anyway, if it 
 receives e-mail that you get, it also can relay
 messages that you send. 
 I think in the worst case you need to
 authenticate.
 
 In that case you may want to try this class for
 composing and sending 
 messages. It comes with a sub class for sending
 messages via SMTP that 
 supports authentication.
 
 http://www.phpclasses.org/mimemessage
 
 You also need this class for the actual message
 delivery:
 
 http://www.phpclasses.org/smtpclass


__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function exchange

2003-06-12 Thread Mark

--- Diana [EMAIL PROTECTED] wrote:
 I totally agree with your first sentence *grin*.
 Anyways, I won`t be able to use your class because my
 server is kind of locked in their network, meaning I
 don`t have the possibility to connect outside, only to
 their servers (NT servers). And as Exchange servers
 don`t use SMTP (meaning the whole protocol is NOT
 used, so your classes won`t help me), I`m not able to
 send mails at all. Only like he offered me to put an
 extra box in the network which will relay the mails
 from my linux server. 
 Does anyone know about the way exchange servers work,
 mapi and mapisend? The only thing I found was how to
 program that in VB (and being able to talk to Exchange
 servers), but it seems like this is not possible for
 my penguin :) (VB on Linux??? sounds stupid)
 I found in old archives of this mailinglist that some
 people asked this question before (how to implement a
 mail function for exchange servers in php) but no one
 knew it. One hint was to use ldap. anyone any idea
 about this? ANY help is appreciated, I will follow the
 threads started about ldap but right now it does not
 look like it has a lot to do with the mail stuff. 
 
 Another hint might be the COM interface (I saw VB code
 they used this) but php offers only very few things on
 this and as I have no idea of microsofts concepts that
 doesn`t help :(
 
 Please email me for suggestions!!! Wold be great to
 implement something new in php ;). If anyone knows
 documents about how outlook  exchange work I would
 like to see them! Thanks :)
 Diana 

I can't comment on how your company's Exchange servers are
configured, but they absolutely *can* talk SMTP. We are using a
web-based application that sends email notifications through our
internal Exchange servers.

Now, they can be set up with SMTP turned off, or so that only certain
other hosts can relay through them (send mail), and that might be
what he's talking about when he says the authenticated list. I
believe it's simply a list of hosts that are allowed to relay through
the Exchange SMTP server.

You'd be fine using SMTP on a connector server. It will relay the
mail to the appropriate mailbox server (assuming they've separate the
functions). 

Out of curiosity, why not give them the IP address and let them add
the host to the authenticated sender list, as he offered? Or did I
miss a part of the converation (very possible).


 
 
 
  --- Manuel Lemos [EMAIL PROTECTED] schrieb:  Hello,
  
  On 06/11/2003 05:38 PM, Diana wrote:
   Hi, 
   just today I stumbled into the same problem. It is
   true, I got this answer from an expert:
  
   Unfortunately this will not work.  SMTP relaying
  is
   disabled on all the
   Exchange connector servers and a standard Exchange
   mailbox server does 
   not
   support SMTP.  The only way that you can send SMTP
   email from within 
   our company is to use the Internal MailSweeper. 
  And
   to allow this we need 
   the IP
   Address of the box that will be sending the
  messages
   so that we can 
   include
   it in the authenticated list.  We have to have
  things
   set up this way 
   for
   Security reasons.
   
   One other thing I should have mentioned.  Outlook
  uses
   mapi to send on 
   the
   Exchange servers.  So we can use the mapisend
  command
   but I do not know 
   if
   your application would support this.  I think that
   this may also need a
   valid Outlook profile to work.
   
   
   I don`t understand that either, because I am
  trying to
   use my Linux server (inside my companys network)
  to
   deliver mails to the exchange server via sendmail.
  
   If anyone knows more about this topic, let me
   know.sorry that this obviously does not belong
  to
   a php list, but I deleted the original email 
  could
   not find the email address of the author of this
  topic
   :(
  
  I wonder about his expertise. Authentication was
  meant for security reasons.
  
  Anyway, you do no not need to relay in the company
  SMTP server unless 
  outside access is blocked in some firewall.
  
  If you are using Linux, you just need to use the
  mail() function because 
  it just uses sendmail by default.
  
  If you still have problems, just use the classes
  that I mentioned 
  enabling direct delivery mode in the SMTP sending
  attributes. That does 
  the same as sendmail but at least if it fails you
  can enable debugging 
  to see what the SMTP protocol dialog reveals.
  
  
  
--- Manuel Lemos [EMAIL PROTECTED] schrieb: 
  Hello,
   
  On 06/10/2003 04:44 PM, Matthias Wulkow wrote:
  
  a friend of mine is trying to set up an automated
  
  mailing function.
  
  The platform is Windows  he's using the last PHP
  
  release at this
  
  time.
  He asks me how to do it with Exchange, because it
  
  doesn't speak SMTP
  
  or not correctly? What is the matter? Is that
  
  true? But that's not
  
  really the question... could somebody point me to
  
  some documents where
  
  I could find 

Re: [PHP] Re: mail() function exchange

2003-06-12 Thread Diana
Hi,
my company set their server up not to talk SMTP
(disabled all -- that guy told me), and my tries to
connect or talk to any of their Exchange servers
failed :( so he must be true. Got onto their NT
servers though ;)
All the company uses Outlook  Exchange,  they use
mapi to talk to each other. If a manager can`t be in
the network, he`s connected via VPN  uses Outlook as
well. They`ve got a trust relationship between their
NT servers  the Exchange ones,  lots of domains
joined. 
As I said, I don`t have a clue of Exchange so correct
me if something sounds strange. 
To your suggestions: of course that would be easy for
me to tell them to set up a new box for me. They`ll do
that. But who likes the easy way ;)?
No, just my curiosity, maybe someone knows how the
protocol or whatever these M$ servers use is working 
I could try to implement that. Would make my project
more portable inside the company (They plan to use it
on other sites as well), so they wouldn`t have
problems with setting up separate Internal
Mailsweepers everytime :).

Can you tellme more about :
 You'd be fine using SMTP on a connector server. It
 will relay the
 mail to the appropriate mailbox server 
is that working even if SMTP is not enabled? The guy
told me that SMTP is not enabled by default on
Exchange servers and they didn`t change that! (that`s
the reason for me to ask how that system works in the
wholehow does outlook send the mail to the
exchange server? Could it be that all the users just
access something like a directory on the exchange
server when starting their outlook (not a local
program!  not working when the exchange server
crashed ;)). Maybe that`s the LDAP part? 
Anyone enlighten me please..

by the way, a lot of people ask these questions
see here

http://www.phpbuilder.com/mail/php3-list/199908/0344.php

http://www.linuxsa.org.au/mailing-list/2000-07/954.html

http://www.faqts.com/knowledge_base/view.phtml/aid/13043/fid/21


 
 I can't comment on how your company's Exchange
 servers are
 configured, but they absolutely *can* talk SMTP. We
 are using a
 web-based application that sends email notifications
 through our
 internal Exchange servers.
 
 Now, they can be set up with SMTP turned off, or so
 that only certain
 other hosts can relay through them (send mail), and
 that might be
 what he's talking about when he says the
 authenticated list. I
 believe it's simply a list of hosts that are allowed
 to relay through
 the Exchange SMTP server.
 
 You'd be fine using SMTP on a connector server. It
 will relay the
 mail to the appropriate mailbox server (assuming
 they've separate the
 functions). 
 
 Out of curiosity, why not give them the IP address
 and let them add
 the host to the authenticated sender list, as he
 offered? Or did I
 miss a part of the converation (very possible).
 
 
  


__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function exchange

2003-06-11 Thread Diana
Hi, 
just today I stumbled into the same problem. It is
true, I got this answer from an expert:

Unfortunately this will not work.  SMTP relaying is
disabled on all the
Exchange connector servers and a standard Exchange
mailbox server does 
not
support SMTP.  The only way that you can send SMTP
email from within 
our company is to use the Internal MailSweeper.  And
to allow this we need 
the IP
Address of the box that will be sending the messages
so that we can 
include
it in the authenticated list.  We have to have things
set up this way 
for
Security reasons.

One other thing I should have mentioned.  Outlook uses
mapi to send on 
the
Exchange servers.  So we can use the mapisend command
but I do not know 
if
your application would support this.  I think that
this may also need a
valid Outlook profile to work.


I don`t understand that either, because I am trying to
use my Linux server (inside my companys network) to
deliver mails to the exchange server via sendmail. 
If anyone knows more about this topic, let me
know.sorry that this obviously does not belong to
a php list, but I deleted the original email  could
not find the email address of the author of this topic
:(


 --- Manuel Lemos [EMAIL PROTECTED] schrieb:  Hello,
 
 On 06/10/2003 04:44 PM, Matthias Wulkow wrote:
  a friend of mine is trying to set up an automated
 mailing function.
  The platform is Windows  he's using the last PHP
 release at this
  time.
  He asks me how to do it with Exchange, because it
 doesn't speak SMTP
  or not correctly? What is the matter? Is that
 true? But that's not
  really the question... could somebody point me to
 some documents where
  I could find out, what has to be done to make it
 work?
 
 I do not see what he means by not speaking SMTP
 correctly. Anyway, if it 
 receives e-mail that you get, it also can relay
 messages that you send. 
 I think in the worst case you need to authenticate.
 
 In that case you may want to try this class for
 composing and sending 
 messages. It comes with a sub class for sending
 messages via SMTP that 
 supports authentication.
 
 http://www.phpclasses.org/mimemessage
 
 You also need this class for the actual message
 delivery:
 
 http://www.phpclasses.org/smtpclass
 
 -- 
 
 Regards,
 Manuel Lemos
 
 Free ready to use OOP components written in PHP
 http://www.phpclasses.org/
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
  

=
WHEN ALL ELSE FAILS, HUG YOUR SNOOPY

Those who bring sunshine to the lives of others cannot keep it from themselves.
J.M. Barrie (1860-1937)


__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function exchange

2003-06-11 Thread Manuel Lemos
Hello,

On 06/11/2003 05:38 PM, Diana wrote:
Hi, 
just today I stumbled into the same problem. It is
true, I got this answer from an expert:

Unfortunately this will not work.  SMTP relaying is
disabled on all the
Exchange connector servers and a standard Exchange
mailbox server does 
not
support SMTP.  The only way that you can send SMTP
email from within 
our company is to use the Internal MailSweeper.  And
to allow this we need 
the IP
Address of the box that will be sending the messages
so that we can 
include
it in the authenticated list.  We have to have things
set up this way 
for
Security reasons.

One other thing I should have mentioned.  Outlook uses
mapi to send on 
the
Exchange servers.  So we can use the mapisend command
but I do not know 
if
your application would support this.  I think that
this may also need a
valid Outlook profile to work.

I don`t understand that either, because I am trying to
use my Linux server (inside my companys network) to
deliver mails to the exchange server via sendmail. 
If anyone knows more about this topic, let me
know.sorry that this obviously does not belong to
a php list, but I deleted the original email  could
not find the email address of the author of this topic
:(
I wonder about his expertise. Authentication was meant for security reasons.

Anyway, you do no not need to relay in the company SMTP server unless 
outside access is blocked in some firewall.

If you are using Linux, you just need to use the mail() function because 
it just uses sendmail by default.

If you still have problems, just use the classes that I mentioned 
enabling direct delivery mode in the SMTP sending attributes. That does 
the same as sendmail but at least if it fails you can enable debugging 
to see what the SMTP protocol dialog reveals.



 --- Manuel Lemos [EMAIL PROTECTED] schrieb:  Hello,

On 06/10/2003 04:44 PM, Matthias Wulkow wrote:

a friend of mine is trying to set up an automated
mailing function.

The platform is Windows  he's using the last PHP
release at this

time.
He asks me how to do it with Exchange, because it
doesn't speak SMTP

or not correctly? What is the matter? Is that
true? But that's not

really the question... could somebody point me to
some documents where

I could find out, what has to be done to make it
work?

I do not see what he means by not speaking SMTP
correctly. Anyway, if it 
receives e-mail that you get, it also can relay
messages that you send. 
I think in the worst case you need to authenticate.

In that case you may want to try this class for
composing and sending 
messages. It comes with a sub class for sending
messages via SMTP that 
supports authentication.

http://www.phpclasses.org/mimemessage

You also need this class for the actual message
delivery:
http://www.phpclasses.org/smtpclass
--

Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail() function exchange

2003-06-10 Thread Manuel Lemos
Hello,

On 06/10/2003 04:44 PM, Matthias Wulkow wrote:
a friend of mine is trying to set up an automated mailing function.
The platform is Windows  he's using the last PHP release at this
time.
He asks me how to do it with Exchange, because it doesn't speak SMTP
or not correctly? What is the matter? Is that true? But that's not
really the question... could somebody point me to some documents where
I could find out, what has to be done to make it work?
I do not see what he means by not speaking SMTP correctly. Anyway, if it 
receives e-mail that you get, it also can relay messages that you send. 
I think in the worst case you need to authenticate.

In that case you may want to try this class for composing and sending 
messages. It comes with a sub class for sending messages via SMTP that 
supports authentication.

http://www.phpclasses.org/mimemessage

You also need this class for the actual message delivery:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail() function

2003-03-04 Thread Patrick Schnegg
The mail() function will only send one mail at a time, to send multiple
mails you would write a loop like this (presuming you had your mail
addresses ready in an array called $emails):

foreach ($emails as $email) {
mail($email, your subject, your message);
}

Denis L. Menezes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello friends,

Can the mail() function send emails to multiple addresses which are
formatted as follows :

[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a
comma or a semicolon between them?

Thanks
Denis





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function

2003-03-04 Thread Jason Wong
On Tuesday 04 March 2003 21:13, Patrick Schnegg wrote:
 The mail() function will only send one mail at a time, to send multiple
 mails you would write a loop like this (presuming you had your mail
 addresses ready in an array called $emails):

 foreach ($emails as $email) {
 mail($email, your subject, your message);
 }

 Denis L. Menezes [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 Hello friends,

 Can the mail() function send emails to multiple addresses which are
 formatted as follows :

 [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a
 comma or a semicolon between them?

Denis, Patrick, both of you take a look at the example in the manual.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Having the fewest wants, I am nearest to the gods.
-- Socrates
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail() function

2003-03-04 Thread Patrick Schnegg
Just in case you don't know, you can easily make an array out of your string
of emails by exploding using the commas as separators:

$emails = explode (,, $stringOfEmails);

Patrick Schnegg [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 The mail() function will only send one mail at a time, to send multiple
 mails you would write a loop like this (presuming you had your mail
 addresses ready in an array called $emails):

 foreach ($emails as $email) {
 mail($email, your subject, your message);
 }

 Denis L. Menezes [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 Hello friends,

 Can the mail() function send emails to multiple addresses which are
 formatted as follows :

 [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a
 comma or a semicolon between them?

 Thanks
 Denis







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mail() function

2003-03-04 Thread Patrick Schnegg
Oh, silly me. Commas are indeed accepted. My apologies.

- Original Message - 
From: Jason Wong [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 2:18 PM
Subject: Re: [PHP] Re: mail() function


 On Tuesday 04 March 2003 21:13, Patrick Schnegg wrote:
  The mail() function will only send one mail at a time, to send multiple
  mails you would write a loop like this (presuming you had your mail
  addresses ready in an array called $emails):
 
  foreach ($emails as $email) {
  mail($email, your subject, your message);
  }
 
  Denis L. Menezes [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  Hello friends,
 
  Can the mail() function send emails to multiple addresses which are
  formatted as follows :
 
  [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a
  comma or a semicolon between them?
 
 Denis, Patrick, both of you take a look at the example in the manual.
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Having the fewest wants, I am nearest to the gods.
 -- Socrates
 */
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: mail() function

2003-03-04 Thread M.A.Bond
Not strictly true, the mail function will send to multiple email addresses
separated by a comma, you can also cc and bcc by using headers. See the
manual, which has some good examples of this.

Mark


-Original Message-
From: Patrick Schnegg [mailto:[EMAIL PROTECTED] 
Sent: 04 March 2003 13:14
To: [EMAIL PROTECTED]
Subject: [PHP] Re: mail() function


The mail() function will only send one mail at a time, to send multiple
mails you would write a loop like this (presuming you had your mail
addresses ready in an array called $emails):

foreach ($emails as $email) {
mail($email, your subject, your message);
}

Denis L. Menezes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello friends,

Can the mail() function send emails to multiple addresses which are
formatted as follows :

[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a
comma or a semicolon between them?

Thanks
Denis





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail function works, but always from nobody@localhost!

2003-03-03 Thread KK
add an extra variable to your mail function. php takes an optional 4th
parameter, which adds features like From and Reply. example:
$extra = From: $name $email\r\n\Reply-To: $email;

so the mail function would be:
mail($recipient,$subject,$body,$extra);

Hope this helped.


Ml [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 How exactly would I go about fixing my current php/sendmail setup so that
it
 uses the value specified in my php input form in the
 from box instead of always setting the email from address as :
 [EMAIL PROTECTED] ???

 Any help would be greatly appreciated. Thanks!





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mail function and Bcc restriction?

2003-03-02 Thread Manuel Lemos
Hello,

On 03/01/2003 08:35 AM, Mirza Muharemagic wrote:
Hi all,

   are there any restrictions for mail function, when I use Bcc? how
   many email adresses can i put in Bcc, are there any PHP
   restriction, or just memory restriction, or something else?
Put them all in a single Bcc: header separating them with commas , .

--

Regards,
Manuel Lemos
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mail function

2003-02-04 Thread Goetz Lohmann
Dale schrieb:
 I am trying to configure the php.ini file so that I can use the mail
 function in my code. The problem I am facing is that I get the following
 error message when I try to run my code:
 
 Warning: mail() [function.mail]: SMTP server response: 550 Relaying is
 prohibited
 

this is an error of sendmail not from PHP ! ... take a look at the
/etc/mail/sendmail.cf or /etc/mail/access of your box and enable
relaying for maybe localhost ...


-- 
 @  Goetz Lohmann, Germany   |   Web-Developer  Sys-Admin
\/  --
()  He's the fellow that people wonder what he does and
||  why the company needs him, until he goes on vacation.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail function problems

2002-10-02 Thread David Robley

In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 I use the mail function tons, never had a problem.  I am working with a client with 
a different
 hosting vendor, they are using PHP 4.2.3, which I guess was a recient upgrade, 
anyway I was
 informed by the client that he wasnt getting email submissions from the website, but 
he was
 getting other emails, to those same accounts that were from outside the website.  
Short story
 long, I took one of the functions that uses the mail function inside of it, and I 
placed it on my
 server, and it worked flawlessly, place the same exact code on back on the other 
site, and
 nothing.  Oh and I dont have access to their error logs.  :(
 
 What sounds wrong?  What sounds bad?  Any thoughts?  Anything i can look for?
 
 thanks,
 
 dan

Are you setting a From: field? It may be that the from address as sent by 
the provider won't resolve, which may cause problems.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail() function

2002-07-26 Thread Richard Lynch

what has to be configured, and how, on a bsd server to allow the mail()
function to work in php? using sendmail?

php.ini
Use the path to sendmail there, with the -t as suggested, and *YES* the
quotes *ARE* supposed to be part of it:

sendmail_path = /path/to/sendmail -t

You may also need to ease up restrictions in sendmail.conf so that the PHP
user is *allowed* to send out email, forge headers, and other fun things
that are pretty essential to making mail() useful.

You may also want to create a specific new user, different from the usual
nobody, and use that for User in httpd.conf, so that PHP (all of Apache,
really) runs as 'www' or 'httpd' instead of 'nobody'

It will stop a few stupid people trying to abuse the lack of restriction on
email sending...

Not *really* much of a barrier, but every little bit helps.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Mail() function

2002-07-11 Thread Richard Lynch

I wonder if there’s a way to *HIDE* some parts from the Heading of the
emails sent with PHP. I’m trying to create an anonymous mail sender but
in the header of the message appears:

Received: (from httpd@localhost)
by www.whateverdomain.com (8.10.2/8.10.2) id g69MEA527130;
Tue, 9 Jul 2002 18:14:10 -0400
Date: Tue, 9 Jul 2002 18:14:10 -0400
Message-Id: 200207092214.g69MEA527130@www.
mailto:200207092214.g69MEA527130@www.%20whateverdomain.com
whateverdomain.com

I want to hide the *whateverdomain.com* (because is my hosting provider…

You can't do that using PHP's mail function.

That particular header is automatically inserted, I believe, by the software
actually sending the email, IE sendmail or qmail or whatever.

What's more, it's pretty much not kosher to not have that.

This is not to say it's impossible to forge such things, and insert email
via an open relay into the mail stream/system somewhere.

Just that it's not something that should be a built-in function to PHP, or
*ANY* legitimate mass-use software for that matter.

I mean, that would be like inviting *EVERYBODY* to spam, uncontrollably, and
would just be stupid.

I honestly have no idea how to forge an email routing path, just know it can
be done, and is not rocket-science.  But you're going to have to dig into
the guts of sendmail or equivalent at a minimum, or search out send spam to
1,000,000 people!!! software to do it...

I don't *think* you can even do it with just PHP's fsockopen to the
much-hated Open Relays of the world...  Or, at least, they'd be tracked back
to that Open Relay anyway... That might be sufficient for your purposes,
whatever they are.  I suggest, however, that you re-examine your purpose,
and decide if it's really worthy of your time and talent.

--
Like Music?  http://l-i-e.com/artists.htm
Off-Topic:  What is the moral equivalent of 'cat' in Windows?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Mail() function

2002-07-11 Thread Miguel Cruz

On Thu, 11 Jul 2002, Richard Lynch wrote:
 I honestly have no idea how to forge an email routing path, just know it can
 be done, and is not rocket-science.  But you're going to have to dig into
 the guts of sendmail or equivalent at a minimum, or search out send spam to
 1,000,000 people!!! software to do it...
 
 I don't *think* you can even do it with just PHP's fsockopen to the
 much-hated Open Relays of the world...  Or, at least, they'd be tracked back
 to that Open Relay anyway... That might be sufficient for your purposes,
 whatever they are.  I suggest, however, that you re-examine your purpose,
 and decide if it's really worthy of your time and talent.

For what it's worth, the only way to create a convincing fake routing
history in a message's headers is to find an open relay that doesn't
properly stamp mail it receives.

There are a very few SMTP servers which will receive and forward a piece 
of mail without adding a Received: line that says where they got it 
from. Thankfully these machines are almost all gone since they have been 
brutally punished by spammers pumping messages through them.

They're also listed on blacklists, so many people (myself included) 
wouldn't see messages that came through them.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Mail() function

2002-07-09 Thread vins

I don't really think there is... I've been trying this for a while now...



César aracena [EMAIL PROTECTED] wrote in message
012501c2278c$afdebcb0$81c405c8@gateway">news:012501c2278c$afdebcb0$81c405c8@gateway...
Hi all.

I wonder if there's a way to *HIDE* some parts from the Heading of the
emails sent with PHP. I'm trying to create an anonymous mail sender but
in the header of the message appears:

Received: (from httpd@localhost)
by www.whateverdomain.com (8.10.2/8.10.2) id g69MEA527130;
Tue, 9 Jul 2002 18:14:10 -0400
Date: Tue, 9 Jul 2002 18:14:10 -0400
Message-Id: 200207092214.g69MEA527130@www.
mailto:200207092214.g69MEA527130@www.%20whateverdomain.com
whateverdomain.com

I want to hide the *whateverdomain.com* (because is my hosting provider.
Just learning some useful things. please look at
www.icaam.com.ar/mass-mailer.php

I just got bored of receiving mass email from this list. fooling around
;-)

 mailto:[EMAIL PROTECTED] Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail function question

2002-07-07 Thread Manuel Lemos

Hello,

On 07/07/2002 07:49 PM, Kirk Babb wrote:
 I'm using argosoft's mailserver with SMTP authentication, and would like to
 know how to pass the usr  pwd inside php's mail() function.  Please help me
 out here, I've RT*M without gaining an understanding of this.

No, mail() function does not have any support for authentication.

You may want to try to use this SMTP client message sending class that 
supports most common forms of SMTP authentication automatically.

http://www.phpclasses.org/smtpclass


-- 

Regards,
Manuel Lemos


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail function question

2002-07-07 Thread Kirk Babb

Thanks - I'm heading there now.  I appreciate the help.

-Kirk


Manuel Lemos [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 On 07/07/2002 07:49 PM, Kirk Babb wrote:
  I'm using argosoft's mailserver with SMTP authentication, and would like
to
  know how to pass the usr  pwd inside php's mail() function.  Please
help me
  out here, I've RT*M without gaining an understanding of this.

 No, mail() function does not have any support for authentication.

 You may want to try to use this SMTP client message sending class that
 supports most common forms of SMTP authentication automatically.

 http://www.phpclasses.org/smtpclass


 --

 Regards,
 Manuel Lemos




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Mail() function problem

2002-07-02 Thread Richard Lynch


Hi friend,

 I am using the SMTP server which needs authentication.

And where did you put the username/password in that will authenticate
PHP?... :-)

I dunno where you have to put it, and maybe you just can't do that, but you
can't expect PHP to just magically know your password...



-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail() function hangs

2002-06-10 Thread Manuel Lemos

Hello,

On 06/10/2002 12:07 PM, Phil Schwarzmann wrote:
 Whenever a user runs the mail function, an e-mail messsage is sent
 properly but the page just hangs.
  
 Has anyone else had this problem?

I heard it happens on Windows but I am not sure why. It looks like it is 
missing \r\n somewhere.

Can you please tell if this PHP class works for you so we can realize 
that it is really a PHP bug?

http://www.phpclasses.org/smtpclass

-- 

Regards,
Manuel Lemos


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail() function

2002-05-28 Thread Manuel Lemos

Hello,

On 05/27/2002 04:38 PM, Jochem Kempe wrote:
 It appears to me that there is something wrong with the mail() function,
 
 I've got an Apache 2.0.36 webserver in an Windows XP environment,
 now everythin seems to work just fine until I try to execute this:
 
 mail([EMAIL PROTECTED], My Subject, Line 1\r\nLine 2\r\nLine3);
 
 it's almost the same code as on your web site but I changed the 
 [EMAIL PROTECTED] to my own e-mail adress so I would be able to see if 
 I've got the mail. I tried severeal ways (somethin with IMAP or such?) 
 but since I'm a php newbie it is quite hard to find understandable 
 documentation.

You're message is probably being rejected and is not bouncing.

Anyway, you may want to try this SMTP client class to try to see if the 
message gets delivered:

http://www.phpclasses.org/smtpclass


-- 

Regards,
Manuel Lemos


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail function

2002-05-06 Thread Matthew Ward

You can add further variables to the end of your current mail() function to
specify the name of who its from, and the email address that they will send
the message to when they use the reply function on their email program, like
this:

mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2\nLine 3,
From:Your Name\nReply-To: [EMAIL PROTECTED]);

Diana Castillo [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi, if I use the mail function, as in :
 mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2\nLine 3);
 The mail comes from Webserver  How can I change the from ?







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: mail function

2002-05-06 Thread Jason Wong

On Monday 06 May 2002 06:31, Matthew Ward wrote:
 You can add further variables to the end of your current mail() function to
 specify the name of who its from, and the email address that they will send
 the message to when they use the reply function on their email program,
 like this:

 mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2\nLine 3,
 From:Your Name\nReply-To: [EMAIL PROTECTED]);

Mail headers should be separated by \r\n.

  http://cr.yp.to/immhf/header.html

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
How many coming men has one known!  Where on earth do they all go to?
-- Sir Arthur Wing Pinero
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail function

2002-05-05 Thread Austin Marshall

Diana Castillo wrote:
Diana Castillo wrote:
 Hi, if I use the mail function, as in :
 mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2\nLine 3);
 The mail comes from Webserver  How can I change the from ?
 
 
 
 

Just as the manual says, the 4th parameter which is optional allows you 
to specify additional headers.

Try mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2\nLine 
3,From: user@domain);



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mail function

2001-12-20 Thread jtjohnston

If you declare



Here is code that works:

?php
session_name(ESLpostcard);
session_start();

$img_encoded = base64_encode($image_data);

mail($theiremail, You Have A Christmas Postcard, , from: \$yourname\
$youremail\r\n
.Content-Type: multipart/mixed;
 boundary=\15E3B1D587950C2CAADCBF93\

This is a multi-part message in MIME format.
--15E3B1D587950C2CAADCBF93
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

$yourmessage

--15E3B1D587950C2CAADCBF93
Content-Type: image/png;
 name=\postcard10.png\
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename=\postcard10.png\

$img_encoded
--15E3B1D587950C2CAADCBF93--

);

?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mail function

2001-12-20 Thread jtjohnston

If you declare a header after you used html or echoed something, it will fail.

header(Location: http://www.winwhole.com.hk/sent.php;)

HTH.
Here is some code that works:

?php
session_name(ESLpostcard);
session_start();

$img_encoded = base64_encode($image_data);

mail($theiremail, You Have A Christmas Postcard, , from: \$yourname\
$youremail\r\n
.Content-Type: multipart/mixed;
 boundary=\15E3B1D587950C2CAADCBF93\

This is a multi-part message in MIME format.
--15E3B1D587950C2CAADCBF93
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

$yourmessage

--15E3B1D587950C2CAADCBF93
Content-Type: image/png;
 name=\postcard10.png\
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename=\postcard10.png\

$img_encoded
--15E3B1D587950C2CAADCBF93--

);

?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: mail function

2001-12-20 Thread Peter

Sorry but I am a bit of a newbie at this.

So do you mean that I am supposed write it like this?

else
{
$mailheaders = From: $email\r\n;
$mailheaders .= Reply-To: $email\r\n;
$mailheaders .= Content-Type: text/html; charset=iso-8859-1\r\n;
$remarks .= brbr$items;
mail([EMAIL PROTECTED], quotation enquiry, $remarks,
from: \$yourname\
$youremail\r\n
Content-Type: multipart/mixed;
  boundary=\15E3B1D587950C2CAADCBF93\

This is a multi-part message in MIME format.
--15E3B1D587950C2CAADCBF93
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit);
header(Location: http://www.winwhole.com.hk/sent.php;);}
};


On Fri, 21 Dec 2001, jtjohnston wrote:

 If you declare a header after you used html or echoed something, it will fail.
 
 header(Location: http://www.winwhole.com.hk/sent.php;)
 
 HTH.
 Here is some code that works:
 
 ?php
 session_name(ESLpostcard);
 session_start();
 
 $img_encoded = base64_encode($image_data);
 
 mail($theiremail, You Have A Christmas Postcard, , from: \$yourname\
 $youremail\r\n
 .Content-Type: multipart/mixed;
  boundary=\15E3B1D587950C2CAADCBF93\
 
 This is a multi-part message in MIME format.
 --15E3B1D587950C2CAADCBF93
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 $yourmessage
 
 --15E3B1D587950C2CAADCBF93
 Content-Type: image/png;
  name=\postcard10.png\
 Content-Transfer-Encoding: base64
 Content-Disposition: inline;
  filename=\postcard10.png\
 
 $img_encoded
 --15E3B1D587950C2CAADCBF93--
 
 );
 
 ?
 
 
 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mail function

2001-12-05 Thread Johan

 Is it possible to use php's mail function to send an html formated email
 (one of your pages or a newsletter, whatever...)?  If so, how?

yes...

Make a header called etc.

Content-type: text/html

Regards,

Johan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mail() function

2001-11-14 Thread Johan Holst Nielsen

 $mailheaders = From: \Do Not Reply\\r\nReply-To: Do Not Reply@Do Not
 Reply\n;
  
 If I use the above headers it says from Do Not [EMAIL PROTECTED]
  
 Does anyone know how to make it just say Do Not Reply?

You cant... but try making it like this:

$mailheaders = FROM: Do Not Reply DoNotReply@localhost\nREPLY-TO: 
DoNotReply@localhost;

regards,

Johan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Mail function....

2001-09-12 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Kyle Smith) wrote:

 Can someone please just run me through the different sections of the mail 
 function please cause i understand you can change the from address etc aswell

It's in the docs, examples and all. 
http://php.net/manual/en/function.mail.php

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mail function

2001-08-23 Thread Gabe da Silveira

There are not a lot of guarantees.  A big part of the problem is that 
you can't get instant feedback.  Your mail server may queue the message 
and not even send it right away, or it could get sent, and your mail 
server doesn't find out for several minutes while the message goes out 
on the 'net and eventually bounces because the address is bad.  There is 
probably a way you can get your mail server to inform you when a message 
fails to get delivered, but beyond that you probably can't do much.

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Richard Baskett) wrote:

 I am trying to get the mail function to return anything that tells me that
 it was sent successfully or at least there were no errors, but assigning a
 variable to equal the mail function does not seem to return anything...  On
 php's site it says it should return true.  Am I going about this wrong?
 
 Quite confused! :)
 
 Rick


-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]