RE: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Alice Wei


> Date: Thu, 22 Apr 2010 00:31:04 +0100
> Subject: Re: [PHP] Mail Function Using PEAR Issues
> From: k...@linux.ie
> To: aj...@alumni.iu.edu
> CC: peter.e.l...@gmail.com; a...@ashleysheridan.co.uk; 
> php-general@lists.php.net
> 
> you have to install the net_smtp package, simply with this command:
> $ pear install net_smtp-1.4.2  (which will explicitly install version
> 1.4.2 of Net_SMTP)
> 
> If that doesn't work. for whatever reason, you could download the
> package manually from http://pear.php.net/package/Net_SMTP/download
> and install it by hand; though for reasons I've outlined in a previous
> post to this list I'd suggest you use the pear installer.
> 
> On Thu, Apr 22, 2010 at 12:12 AM, Alice Wei  wrote:
> >
> >> Date: Wed, 21 Apr 2010 22:01:03 +0200
> >> Subject: Re: [PHP] Mail Function Using PEAR Issues
> >> To: aj...@alumni.iu.edu
> >> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
> >>
> >> On 21 April 2010 21:58, Alice Wei  wrote:
> >> >> From: peter.e.l...@gmail.com
> >> >> Date: Wed, 21 Apr 2010 21:51:31 +0200
> >> >> Subject: Re: [PHP] Mail Function Using PEAR Issues
> >> >> To: aj...@alumni.iu.edu
> >> >> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
> >> >>
> >> >> On 21 April 2010 18:44, Alice Wei  wrote:
> >> >> > I have mentioned several posts earlier that I have done nothing about 
> >> >> > my
> >> >> > php.ini file. From what you said, since I use U-Verse, am I supposed 
> >> >> > to
> >> >> > do
> >> >> > something as described here:
> >> >> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf
> >> >> >
> >> >> >
> >> >> >
> >> >> > I thought with PEAR, you don't need to do that anymore. Or, am I 
> >> >> > wrong?
> >> >> >
> >> >>
> >> >> Read the PEAR documentation:
> >> >> http://pear.php.net/manual/en/package.mail.mail.factory.php
> >> >> You can use other backends than just 'mail' - try using the smtp and
> >> >> fill in your smtp settings as needed.
> >> >>
> >> >> Regards
> >> >> Peter
> >> >>
> >> > I saw something like that on
> >> > http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm,
> >> > and this is probably what you are talking about?
> >> >
> >> >  $smtp = Mail::factory('smtp',
> >> >array ('host' => $host,
> >> >  'auth' => true,
> >> >  'username' => $username,
> >> >  'password' => $password));
> >> >
> >> > Do I still need to install a mail server? I have Evolution Mail on my 
> >> > Linux
> >> > box, and looks like that is a client and not a server.
> >> > Or, can I use any of the mail smtp setup, like Google? Or, do use some
> >> > authentication information from
> >> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use
> >> > U-Verse at home?
> >>
> >> Yes, the example you provide is the right direction - you can put in
> >> the smtp details you use to connect from Evolution to GMail, you don't
> >> need to setup a separate smtp server on your system.
> >>
> >> Regards
> >> Peter
> >>
> >
> > Well, hold it. I have edited my code to hold the information as we have 
> > discussed earlier, and this is the error I have now:
> >
> > Warning:  include_once(Net/SMTP.php) [function.include-once]: failed to 
> > open stream: No such file or directory in /usr/share/php/Mail/smtp.php on 
> > line 348
> >
> >
> >
> > Warning:  include_once() [function.include]: Failed opening 'Net/SMTP.php' 
> > for inclusion (include_path='.:/usr/share/php') in 
> > /usr/share/php/Mail/smtp.php on line 348
> >
> >
> >
> > Fatal error:  Class 'Net_SMTP' not found in /usr/share/php/Mail/smtp.php on 
> > line 349
> >
> > I am not sure what this means. If I have installed pear correctly, what 
> > else do I have to do here? I can see that I have some "significant" error 
> > messages than not getting anything at all.
> >
> > Thanks for your help.
> >
> > Alice
> >
> > _
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
> 
> 
> 
> -- 
> http://blogs.linux.ie/kenguest/

As the time of writing this, I have installed the missing Net_SMTP pear package 
unto my Linux box. I have just tested it, and I have received two email 
messages to the desired mailbox, without having to install a mail server. 
Thanks for your help.

I really appreciate this. 

Alice
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Ken Guest
you have to install the net_smtp package, simply with this command:
$ pear install net_smtp-1.4.2  (which will explicitly install version
1.4.2 of Net_SMTP)

If that doesn't work. for whatever reason, you could download the
package manually from http://pear.php.net/package/Net_SMTP/download
and install it by hand; though for reasons I've outlined in a previous
post to this list I'd suggest you use the pear installer.

On Thu, Apr 22, 2010 at 12:12 AM, Alice Wei  wrote:
>
>> Date: Wed, 21 Apr 2010 22:01:03 +0200
>> Subject: Re: [PHP] Mail Function Using PEAR Issues
>> To: aj...@alumni.iu.edu
>> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
>>
>> On 21 April 2010 21:58, Alice Wei  wrote:
>> >> From: peter.e.l...@gmail.com
>> >> Date: Wed, 21 Apr 2010 21:51:31 +0200
>> >> Subject: Re: [PHP] Mail Function Using PEAR Issues
>> >> To: aj...@alumni.iu.edu
>> >> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
>> >>
>> >> On 21 April 2010 18:44, Alice Wei  wrote:
>> >> > I have mentioned several posts earlier that I have done nothing about my
>> >> > php.ini file. From what you said, since I use U-Verse, am I supposed to
>> >> > do
>> >> > something as described here:
>> >> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf
>> >> >
>> >> >
>> >> >
>> >> > I thought with PEAR, you don't need to do that anymore. Or, am I wrong?
>> >> >
>> >>
>> >> Read the PEAR documentation:
>> >> http://pear.php.net/manual/en/package.mail.mail.factory.php
>> >> You can use other backends than just 'mail' - try using the smtp and
>> >> fill in your smtp settings as needed.
>> >>
>> >> Regards
>> >> Peter
>> >>
>> > I saw something like that on
>> > http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm,
>> > and this is probably what you are talking about?
>> >
>> >  $smtp = Mail::factory('smtp',
>> >    array ('host' => $host,
>> >      'auth' => true,
>> >      'username' => $username,
>> >      'password' => $password));
>> >
>> > Do I still need to install a mail server? I have Evolution Mail on my Linux
>> > box, and looks like that is a client and not a server.
>> > Or, can I use any of the mail smtp setup, like Google? Or, do use some
>> > authentication information from
>> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use
>> > U-Verse at home?
>>
>> Yes, the example you provide is the right direction - you can put in
>> the smtp details you use to connect from Evolution to GMail, you don't
>> need to setup a separate smtp server on your system.
>>
>> Regards
>> Peter
>>
>
> Well, hold it. I have edited my code to hold the information as we have 
> discussed earlier, and this is the error I have now:
>
> Warning:  include_once(Net/SMTP.php) [function.include-once]: failed to open 
> stream: No such file or directory in /usr/share/php/Mail/smtp.php on line 348
>
>
>
> Warning:  include_once() [function.include]: Failed opening 'Net/SMTP.php' 
> for inclusion (include_path='.:/usr/share/php') in 
> /usr/share/php/Mail/smtp.php on line 348
>
>
>
> Fatal error:  Class 'Net_SMTP' not found in /usr/share/php/Mail/smtp.php on 
> line 349
>
> I am not sure what this means. If I have installed pear correctly, what else 
> do I have to do here? I can see that I have some "significant" error messages 
> than not getting anything at all.
>
> Thanks for your help.
>
> Alice
>
> _
> Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1



-- 
http://blogs.linux.ie/kenguest/

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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Alice Wei

> Date: Wed, 21 Apr 2010 22:01:03 +0200
> Subject: Re: [PHP] Mail Function Using PEAR Issues
> To: aj...@alumni.iu.edu
> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
> 
> On 21 April 2010 21:58, Alice Wei  wrote:
> >> From: peter.e.l...@gmail.com
> >> Date: Wed, 21 Apr 2010 21:51:31 +0200
> >> Subject: Re: [PHP] Mail Function Using PEAR Issues
> >> To: aj...@alumni.iu.edu
> >> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
> >>
> >> On 21 April 2010 18:44, Alice Wei  wrote:
> >> > I have mentioned several posts earlier that I have done nothing about my
> >> > php.ini file. From what you said, since I use U-Verse, am I supposed to
> >> > do
> >> > something as described here:
> >> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf
> >> >
> >> >
> >> >
> >> > I thought with PEAR, you don't need to do that anymore. Or, am I wrong?
> >> >
> >>
> >> Read the PEAR documentation:
> >> http://pear.php.net/manual/en/package.mail.mail.factory.php
> >> You can use other backends than just 'mail' - try using the smtp and
> >> fill in your smtp settings as needed.
> >>
> >> Regards
> >> Peter
> >>
> > I saw something like that on
> > http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm,
> > and this is probably what you are talking about?
> >
> >  $smtp = Mail::factory('smtp',
> >array ('host' => $host,
> >  'auth' => true,
> >  'username' => $username,
> >  'password' => $password));
> >
> > Do I still need to install a mail server? I have Evolution Mail on my Linux
> > box, and looks like that is a client and not a server.
> > Or, can I use any of the mail smtp setup, like Google? Or, do use some
> > authentication information from
> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use
> > U-Verse at home?
> 
> Yes, the example you provide is the right direction - you can put in
> the smtp details you use to connect from Evolution to GMail, you don't
> need to setup a separate smtp server on your system.
> 
> Regards
> Peter
> 

Well, hold it. I have edited my code to hold the information as we have 
discussed earlier, and this is the error I have now:

Warning:  include_once(Net/SMTP.php) [function.include-once]: failed to open 
stream: No such file or directory in /usr/share/php/Mail/smtp.php on line 348



Warning:  include_once() [function.include]: Failed opening 'Net/SMTP.php' for 
inclusion (include_path='.:/usr/share/php') in /usr/share/php/Mail/smtp.php on 
line 348



Fatal error:  Class 'Net_SMTP' not found in /usr/share/php/Mail/smtp.php on 
line 349

I am not sure what this means. If I have installed pear correctly, what else do 
I have to do here? I can see that I have some "significant" error messages than 
not getting anything at all. 

Thanks for your help.

Alice
  
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Peter Lind
On 21 April 2010 21:58, Alice Wei  wrote:
>> From: peter.e.l...@gmail.com
>> Date: Wed, 21 Apr 2010 21:51:31 +0200
>> Subject: Re: [PHP] Mail Function Using PEAR Issues
>> To: aj...@alumni.iu.edu
>> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
>>
>> On 21 April 2010 18:44, Alice Wei  wrote:
>> > I have mentioned several posts earlier that I have done nothing about my
>> > php.ini file. From what you said, since I use U-Verse, am I supposed to
>> > do
>> > something as described here:
>> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf
>> >
>> >
>> >
>> > I thought with PEAR, you don't need to do that anymore. Or, am I wrong?
>> >
>>
>> Read the PEAR documentation:
>> http://pear.php.net/manual/en/package.mail.mail.factory.php
>> You can use other backends than just 'mail' - try using the smtp and
>> fill in your smtp settings as needed.
>>
>> Regards
>> Peter
>>
> I saw something like that on
> http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm,
> and this is probably what you are talking about?
>
>  $smtp = Mail::factory('smtp',
>    array ('host' => $host,
>  'auth' => true,
>  'username' => $username,
>  'password' => $password));
>
> Do I still need to install a mail server? I have Evolution Mail on my Linux
> box, and looks like that is a client and not a server.
> Or, can I use any of the mail smtp setup, like Google? Or, do use some
> authentication information from
> http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use
> U-Verse at home?

Yes, the example you provide is the right direction - you can put in
the smtp details you use to connect from Evolution to GMail, you don't
need to setup a separate smtp server on your system.

Regards
Peter

-- 

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51


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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Alice Wei

> From: peter.e.l...@gmail.com
> Date: Wed, 21 Apr 2010 21:51:31 +0200
> Subject: Re: [PHP] Mail Function Using PEAR Issues
> To: aj...@alumni.iu.edu
> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
> 
> On 21 April 2010 18:44, Alice Wei  wrote:
> > I have mentioned several posts earlier that I have done nothing about my
> > php.ini file. From what you said, since I use U-Verse, am I supposed to do
> > something as described here:
> > http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf
> >
> >
> >
> > I thought with PEAR, you don't need to do that anymore. Or, am I wrong?
> >
> 
> Read the PEAR documentation:
> http://pear.php.net/manual/en/package.mail.mail.factory.php
> You can use other backends than just 'mail' - try using the smtp and
> fill in your smtp settings as needed.
> 
> Regards
> Peter
> 
I saw something like that on 
http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm,
 and this is probably what you are talking about?

 $smtp = Mail::factory('smtp',
   array ('host' => $host,
 'auth' => true,
 'username' => $username,
 'password' => $password));
Do I still need to install a mail server? I have Evolution Mail on my Linux 
box, and looks like that is a client and not a server. 
Or, can I use any of the mail smtp setup, like Google? Or, do use some 
authentication information from 
http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use 
U-Verse at home? 

Thanks for your help.

Alice
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Peter Lind
On 21 April 2010 18:44, Alice Wei  wrote:
> I have mentioned several posts earlier that I have done nothing about my
> php.ini file. From what you said, since I use U-Verse, am I supposed to do
> something as described here:
> http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf
>
>
>
> I thought with PEAR, you don't need to do that anymore. Or, am I wrong?
>

Read the PEAR documentation:
http://pear.php.net/manual/en/package.mail.mail.factory.php
You can use other backends than just 'mail' - try using the smtp and
fill in your smtp settings as needed.

Regards
Peter

-- 

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51


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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Alice Wei

> From: peter.e.l...@gmail.com
> Date: Wed, 21 Apr 2010 09:29:19 +0200
> Subject: Re: [PHP] Mail Function Using PEAR Issues
> To: aj...@alumni.iu.edu
> CC: a...@ashleysheridan.co.uk; php-general@lists.php.net
> 
> On 21 April 2010 04:25, Alice Wei  wrote:
> > Well, from my experience with Ubuntu, looks like that it does not do that. 
> > Unless, I am doing it wrong?
> 
> So did you try using the 'smtp' backend and passing all the connection
> details rather than 'mail'?
> 
I have mentioned several posts earlier that I have done nothing about my 
php.ini file. From what you said, since I use U-Verse, am I supposed to do 
something as described here: 
http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf
 
I thought with PEAR, you don't need to do that anymore. Or, am I wrong?
 
Alice
 
 
 
 
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Ken Guest
The PEAR Mail package does not fall back from one mechanism to another
if the first fails.


On Tue, Apr 20, 2010 at 9:16 PM, Ashley Sheridan
 wrote:
> On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote:
>
>> On 20 April 2010 20:17, Alice Wei  wrote:
>> >
>> >> From: peter.e.l...@gmail.com
>> >> Date: Mon, 19 Apr 2010 10:15:08 +0200
>> >> Subject: Re: [PHP] Mail Function Using PEAR Issues
>> >> To: aj...@alumni.iu.edu
>> >> CC: php-general@lists.php.net
>> >>
>> >> Most, if not all, mail servers keep log files. You should look for the
>> >> log files to see if the mail server has sent your mail properly or is
>> >> experiencing problems (those may not feed back into PHP).
>> >>
>> >> Regards
>> >> Peter
>> >>
>> >> --
>> >> 
>> >> WWW: http://plphp.dk / http://plind.dk
>> >> LinkedIn: http://www.linkedin.com/in/plind
>> >> Flickr: http://www.flickr.com/photos/fake51
>> >> BeWelcome: Fake51
>> >> Couchsurfing: Fake51
>> >> 
>> >
>> > You know where I can find that? I use Evolution Mail, a mail server? I 
>> > found
>> > it through Ubuntu yesterday. Here is the link:
>> > http://projects.gnome.org/evolution/ It asks me to put in the type of mail
>> > service I used, it grabbed Google, which is smtp.google.com. I still cannot
>> > send mail. I start to wonder what is going on.
>> >
>> > Alice
>> >
>>
>> Evolution is a mail client, not a mail server. Apart from that, you're
>> using the 'mail' (PHPs mail function) as the backend mailer in your
>> PEAR script - try using smtp instead and pass the SMTP config data you
>> normally use. Have a look at
>> http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp
>> part.
>>
>> Regards
>> Peter
>>
>> --
>> 
>> WWW: http://plphp.dk / http://plind.dk
>> LinkedIn: http://www.linkedin.com/in/plind
>> Flickr: http://www.flickr.com/photos/fake51
>> BeWelcome: Fake51
>> Couchsurfing: Fake51
>> 
>>
>
>
> If you've got Pear on Ubuntu, can Pear not default to sendmail if no
> SMTP connection is set up?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>



-- 
http://blogs.linux.ie/kenguest/

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



Re: [PHP] Mail Function Using PEAR Issues

2010-04-21 Thread Peter Lind
On 21 April 2010 04:25, Alice Wei  wrote:
> Well, from my experience with Ubuntu, looks like that it does not do that. 
> Unless, I am doing it wrong?

So did you try using the 'smtp' backend and passing all the connection
details rather than 'mail'?

--

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51


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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-20 Thread Alice Wei


Subject: Re: [PHP] Mail Function Using PEAR Issues
From: a...@ashleysheridan.co.uk
To: peter.e.l...@gmail.com
CC: aj...@alumni.iu.edu; php-general@lists.php.net
Date: Tue, 20 Apr 2010 21:16:03 +0100






  
  


On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote:

On 20 April 2010 20:17, Alice Wei  wrote:
>
>> From: peter.e.l...@gmail.com
>> Date: Mon, 19 Apr 2010 10:15:08 +0200
>> Subject: Re: [PHP] Mail Function Using PEAR Issues
>> To: aj...@alumni.iu.edu
>> CC: php-general@lists.php.net
>>
>> Most, if not all, mail servers keep log files. You should look for the
>> log files to see if the mail server has sent your mail properly or is
>> experiencing problems (those may not feed back into PHP).
>>
>> Regards
>> Peter
>>
>> --
>> 
>> WWW: http://plphp.dk / http://plind.dk
>> LinkedIn: http://www.linkedin.com/in/plind
>> Flickr: http://www.flickr.com/photos/fake51
>> BeWelcome: Fake51
>> Couchsurfing: Fake51
>> 
>
> You know where I can find that? I use Evolution Mail, a mail server? I found
> it through Ubuntu yesterday. Here is the link:
> http://projects.gnome.org/evolution/ It asks me to put in the type of mail
> service I used, it grabbed Google, which is smtp.google.com. I still cannot
> send mail. I start to wonder what is going on.
>
> Alice
>

Evolution is a mail client, not a mail server. Apart from that, you're
using the 'mail' (PHPs mail function) as the backend mailer in your
PEAR script - try using smtp instead and pass the SMTP config data you
normally use. Have a look at
http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp
part.

Regards
Peter

-- 

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51





If you've got Pear on Ubuntu, can Pear not default to sendmail if no SMTP 
connection is set up?


Well, from my experience with Ubuntu, looks like that it does not do that. 
Unless, I am doing it wrong?






Thanks,

Ash

http://www.ashleysheridan.co.uk







  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

RE: [PHP] Mail Function Using PEAR Issues

2010-04-20 Thread Alice Wei


Subject: Re: [PHP] Mail Function Using PEAR Issues
From: a...@ashleysheridan.co.uk
To: peter.e.l...@gmail.com
CC: aj...@alumni.iu.edu; php-general@lists.php.net
Date: Tue, 20 Apr 2010 21:16:03 +0100






  
  


On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote:

On 20 April 2010 20:17, Alice Wei  wrote:
>
>> From: peter.e.l...@gmail.com
>> Date: Mon, 19 Apr 2010 10:15:08 +0200
>> Subject: Re: [PHP] Mail Function Using PEAR Issues
>> To: aj...@alumni.iu.edu
>> CC: php-general@lists.php.net
>>
>> Most, if not all, mail servers keep log files. You should look for the
>> log files to see if the mail server has sent your mail properly or is
>> experiencing problems (those may not feed back into PHP).
>>
>> Regards
>> Peter
>>
>> --
>> 
>> WWW: http://plphp.dk / http://plind.dk
>> LinkedIn: http://www.linkedin.com/in/plind
>> Flickr: http://www.flickr.com/photos/fake51
>> BeWelcome: Fake51
>> Couchsurfing: Fake51
>> 
>
> You know where I can find that? I use Evolution Mail, a mail server? I found
> it through Ubuntu yesterday. Here is the link:
> http://projects.gnome.org/evolution/ It asks me to put in the type of mail
> service I used, it grabbed Google, which is smtp.google.com. I still cannot
> send mail. I start to wonder what is going on.
>
> Alice
>

Evolution is a mail client, not a mail server. Apart from that, you're
using the 'mail' (PHPs mail function) as the backend mailer in your
PEAR script - try using smtp instead and pass the SMTP config data you
normally use. Have a look at
http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp
part.

Regards
Peter

-- 

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51





If you've got Pear on Ubuntu, can Pear not default to sendmail if no SMTP 
connection is set up?


Well, from my experience with Ubuntu, looks like that it does not do that. 
Unless, I am doing it wrong?






Thanks,

Ash

http://www.ashleysheridan.co.uk







  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

Re: [PHP] Mail Function Using PEAR Issues

2010-04-20 Thread Ashley Sheridan
On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote:

> On 20 April 2010 20:17, Alice Wei  wrote:
> >
> >> From: peter.e.l...@gmail.com
> >> Date: Mon, 19 Apr 2010 10:15:08 +0200
> >> Subject: Re: [PHP] Mail Function Using PEAR Issues
> >> To: aj...@alumni.iu.edu
> >> CC: php-general@lists.php.net
> >>
> >> Most, if not all, mail servers keep log files. You should look for the
> >> log files to see if the mail server has sent your mail properly or is
> >> experiencing problems (those may not feed back into PHP).
> >>
> >> Regards
> >> Peter
> >>
> >> --
> >> 
> >> WWW: http://plphp.dk / http://plind.dk
> >> LinkedIn: http://www.linkedin.com/in/plind
> >> Flickr: http://www.flickr.com/photos/fake51
> >> BeWelcome: Fake51
> >> Couchsurfing: Fake51
> >> 
> >
> > You know where I can find that? I use Evolution Mail, a mail server? I found
> > it through Ubuntu yesterday. Here is the link:
> > http://projects.gnome.org/evolution/ It asks me to put in the type of mail
> > service I used, it grabbed Google, which is smtp.google.com. I still cannot
> > send mail. I start to wonder what is going on.
> >
> > Alice
> >
> 
> Evolution is a mail client, not a mail server. Apart from that, you're
> using the 'mail' (PHPs mail function) as the backend mailer in your
> PEAR script - try using smtp instead and pass the SMTP config data you
> normally use. Have a look at
> http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp
> part.
> 
> Regards
> Peter
> 
> -- 
> 
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> Flickr: http://www.flickr.com/photos/fake51
> BeWelcome: Fake51
> Couchsurfing: Fake51
> 
> 


If you've got Pear on Ubuntu, can Pear not default to sendmail if no
SMTP connection is set up?

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Mail Function Using PEAR Issues

2010-04-20 Thread Peter Lind
On 20 April 2010 20:17, Alice Wei  wrote:
>
>> From: peter.e.l...@gmail.com
>> Date: Mon, 19 Apr 2010 10:15:08 +0200
>> Subject: Re: [PHP] Mail Function Using PEAR Issues
>> To: aj...@alumni.iu.edu
>> CC: php-general@lists.php.net
>>
>> Most, if not all, mail servers keep log files. You should look for the
>> log files to see if the mail server has sent your mail properly or is
>> experiencing problems (those may not feed back into PHP).
>>
>> Regards
>> Peter
>>
>> --
>> 
>> WWW: http://plphp.dk / http://plind.dk
>> LinkedIn: http://www.linkedin.com/in/plind
>> Flickr: http://www.flickr.com/photos/fake51
>> BeWelcome: Fake51
>> Couchsurfing: Fake51
>> 
>
> You know where I can find that? I use Evolution Mail, a mail server? I found
> it through Ubuntu yesterday. Here is the link:
> http://projects.gnome.org/evolution/ It asks me to put in the type of mail
> service I used, it grabbed Google, which is smtp.google.com. I still cannot
> send mail. I start to wonder what is going on.
>
> Alice
>

Evolution is a mail client, not a mail server. Apart from that, you're
using the 'mail' (PHPs mail function) as the backend mailer in your
PEAR script - try using smtp instead and pass the SMTP config data you
normally use. Have a look at
http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp
part.

Regards
Peter

-- 

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51


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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-20 Thread Alice Wei


> From: peter.e.l...@gmail.com
> Date: Mon, 19 Apr 2010 10:15:08 +0200
> Subject: Re: [PHP] Mail Function Using PEAR Issues
> To: aj...@alumni.iu.edu
> CC: php-general@lists.php.net
> 
> Most, if not all, mail servers keep log files. You should look for the
> log files to see if the mail server has sent your mail properly or is
> experiencing problems (those may not feed back into PHP).
> 
> Regards
> Peter
> 
> -- 
> 
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> Flickr: http://www.flickr.com/photos/fake51
> BeWelcome: Fake51
> Couchsurfing: Fake51
> 

You know where I can find that? I use Evolution Mail, a mail server? I found it 
through Ubuntu yesterday. Here is the link: 
http://projects.gnome.org/evolution/ It asks me to put in the type of mail 
service I used, it grabbed Google, which is smtp.google.com. I still cannot 
send mail. I start to wonder what is going on. 

Alice
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Re: [PHP] Mail Function Using PEAR Issues

2010-04-20 Thread Ken Guest
On Tue, Apr 20, 2010 at 2:10 AM, David McGlone  wrote:
> On Mon, 2010-04-19 at 08:25 -0400, Alice Wei wrote:
>
>> I have not changed any of my SMTP settings since my new installation of
>> PHP with Pear. So, I am not sure what the settings are supposed to be.
>> Would I need to install anything else even when the Pear Mail package
>> has been installed?

You might, depending on if you need to use the Mail_Mime or Mail_Queue
packages also (for sending emails with attachments etc etc or for
sending mails in bulk).
 Also there's some rather nice new functionality in the more recent
versions of Mail and Net_SMTP that enable you to log the ESMTP Id of
mails you have submitted to a mail server (along with the SMTP
greeting sent by that server when you connect to it).

> Alice, I never use the PEAR install from my distro, I always download
> and install PEAR into my working folder. The benefit of doing it this
> way is so that when you move your project to a different server, nothing
> will break and you don't have to change anything.
>
> Sometimes when I create a new project, I'll just copy the PEAR folder
> from an older project to the new one. The only thing you may have to
> change in your PHP code is the path to the PEAR libs only if you don't
> put them in the same place every time.
>

When some bug is fixed or dependencies of some of those PEAR packages
change I think you'll find your attitude towards that will change -
there's a pear installer so you don't have to update and track the
dependencies by hand - you do regularly update your packages don't
you? It's smart to do so because at the very least you don't have to
implement work-arounds for bugs that have been fixed in later versions
of those packages - and in the worst-case scenario it means you're not
using versions that have PEAR Security Advisories issued against them.

I believe it's possible to have seperate pear config files per project
so you're not limited to having to use the same versions of packages
across all projects.

If you're using more than a handful of PEAR packages in your project
you might want to write your own meta-package for the project; that
way you don't have to install all those packages individually;
you just do something like "$pear install myProject.xml" and the pear
installer will download and install whichever pear packages you have
described in your xml file.

Details on doing this are at
http://pear.php.net/manual/en/guide.users.dependencytracking.php

For the record, this is the example script that I submitted to
http://www.web-development-blog.com/archives/php-mail-scripts-using-smtp-transport-a-guide-for-beginners/
for demonstrating how to use the PEAR packages for sending a mail with
a file attached.:

“;
$to = “Barney Rubble “;
$subject = “Mail Subject”;
$message = “this is the text of the mail, sent using PEAR’s Mail packages.”;
$host = “smtp.example.com”;
$port = “25″;
$headers = array (‘From’ => $from, ‘To’ => $to, ‘Subject’ => $subject);
$smtp = Mail::factory(’smtp’, array (‘host’ => $host, ‘port’ => $port));
$mime = new Mail_mime();
$mime->setTxtBody($message);
$mime->addAttachment(“/home/ken/logo.png”, ‘image/png’);
$body = $mime->get();
$mail = $smtp->send($to, $mime->headers($headers), $body);

if (PEAR::isError($mail)) {
echo($mail->getMessage() . “!\n”);
} else {
echo(“Message successfully sent to $to!\n”);
echo “Queued As (ESMTP Id): “, $smtp->queued_as, “\n”;
echo “Greeting From Mailserver: “, $smtp->greeting, “\n”;
}

?>


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



-- 
http://blogs.linux.ie/kenguest/

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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread David McGlone
On Mon, 2010-04-19 at 08:25 -0400, Alice Wei wrote:

> I have not changed any of my SMTP settings since my new installation of 
> PHP with Pear. So, I am not sure what the settings are supposed to be. 
> Would I need to install anything else even when the Pear Mail package 
> has been installed?

Alice, I never use the PEAR install from my distro, I always download
and install PEAR into my working folder. The benefit of doing it this
way is so that when you move your project to a different server, nothing
will break and you don't have to change anything.

Sometimes when I create a new project, I'll just copy the PEAR folder
from an older project to the new one. The only thing you may have to
change in your PHP code is the path to the PEAR libs only if you don't
put them in the same place every time.

Blessings,
David M.


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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread Alice Wei

 > Date: Sun, 18 Apr 2010 21:39:19 -0500
> From: k...@daleco.biz
> To: aj...@alumni.iu.edu
> CC: k...@designdrumm.com; php-general@lists.php.net
> Subject: Re: [PHP] Mail Function Using PEAR Issues
> 
> Alice Wei wrote:
> > 
> >> Date: Sun, 18 Apr 2010 21:02:29 -0500
> >> From: k...@daleco.biz
> >> To: aj...@alumni.iu.edu
> >> CC: k...@designdrumm.com; php-general@lists.php.net
> >> Subject: Re: [PHP] Mail Function Using PEAR Issues
> >>
> >> Karl DeSaulniers wrote:
> >>> Hey Alice,
> >>> Again, try throwing the MIME in.
> >>>
> >>> $headers  = 'MIME-Version: 1.0' . "\r\n";
> >>> $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
> >> Also:
> >>
> >> $headers .= 'Errors-to: ' . "\r\n";
> >>
> >>Which I suggested on your previous thread.  Also, I see you have
> >> $from set to equal "localhost".  Many SMTP servers will reject this
> >> I *think*, because "localhost" is a hostname, not a working mailbox.
> >> Try making $from equal to a real working address - possibly the same
> >> one as your "Errors-to:" header..
> >>
> >> My $0.02,
> >>
> >> KDK
> >>
> >>> On Apr 18, 2010, at 10:11 AM, Alice Wei wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>>   After several days, I have rebuilt my system on Linux using Ubuntu, 
> >>>> installed PEAR and such. Thankfully, when I execute the code, it no 
> >>>> longer gives me the error that the class is not found. Yet, when I 
> >>>> submit the form now, I can always see the confirmation message telling 
> >>>> me that my message has been sent, but I cannot see it even in another 
> >>>> mailbox.
> >>>>
> >>>> Here is the code:
> >>>>
> >>>> require_once("Mail.php");
> >>>> $mail = Mail::factory("mail");
> >>>>
> >>>> $your_name = $_POST['your_name'];
> >>>> $email = $_POST['email'];
> >>>> $question = $_POST['question'];
> >>>> $comments= $_POST['comments'];
> >>>> $submit = $_POST['submit'];
> >>>>
> >>>> $from = "localhost";
> >>>> $to =  $email;
> >>>> $subject = "Comments";
> >>>> $body = "From: $your_name\n E-Mail: $email\n Reason Contact: 
> >>>> $question\n Comments:\n $comments";
> >>>>
> >>>> $host = "localhost";
> >>>> $headers = array ('From' => $from,'To' => $to,'Subject' => $subject);
> >>>> $mail ->send($to, $headers, $body);
> >>>> if (PEAR::isError($mail)) echo "" . $mail->getMessage() . "";
> >>>> else {
> >>>>echo "Message successfully sent! 
> >>>>Thank You For Contacting Us
> >>>>We will contact you within the next 24 business 
> >>>> hours.
> >>>>Here is what you have input:
> >>>>Your Name is " . $your_name .  "
> >>>>Your Email is " . $email . "
> >>>>You contacted us because you have a " . $question . 
> >>>> "
> >>>>Here are your comments: " . $comments . "
> >>>>  Have a Nice Day!";
> >>>>   }
> >>>> }
> >>>>
> >>>> Can anyone on the list please give me some pointers on what might have 
> >>>> been wrong here? I have not edited anything in the php.ini file 
> >>>> regarding SMTP.
> >>>>
> >>>> Thanks.
> >>>>
> >>>> Alice
> > 
> > Hi, 
> > 
> > Here is the revised version, and I don't think I have experienced any  
>  > changes in terms of the output on the screen. Plus, I still get no email.
> > 
> >  > 
> > require_once("Mail.php");
> > $mail = Mail::factory("mail");
> > $your_name = $_POST['your_name'];
> > $email = $_POST['email'];
> > $question = $_POST['question'];
> > $comments= $_POST['comments'];
> > $submit = 

Re: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread Peter Lind
Most, if not all, mail servers keep log files. You should look for the
log files to see if the mail server has sent your mail properly or is
experiencing problems (those may not feed back into PHP).

Regards
Peter

-- 

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51


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



Re: [PHP] Mail Function Using PEAR Issues

2010-04-18 Thread Kevin Kinsey

Alice Wei wrote:



Date: Sun, 18 Apr 2010 21:02:29 -0500
From: k...@daleco.biz
To: aj...@alumni.iu.edu
CC: k...@designdrumm.com; php-general@lists.php.net
Subject: Re: [PHP] Mail Function Using PEAR Issues

Karl DeSaulniers wrote:

Hey Alice,
Again, try throwing the MIME in.

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

Also:

$headers .= 'Errors-to: ' . "\r\n";

   Which I suggested on your previous thread.  Also, I see you have
$from set to equal "localhost".  Many SMTP servers will reject this
I *think*, because "localhost" is a hostname, not a working mailbox.
Try making $from equal to a real working address - possibly the same
one as your "Errors-to:" header..

My $0.02,

KDK


On Apr 18, 2010, at 10:11 AM, Alice Wei wrote:


Hi,

  After several days, I have rebuilt my system on Linux using Ubuntu, 
installed PEAR and such. Thankfully, when I execute the code, it no 
longer gives me the error that the class is not found. Yet, when I 
submit the form now, I can always see the confirmation message telling 
me that my message has been sent, but I cannot see it even in another 
mailbox.


Here is the code:

require_once("Mail.php");
$mail = Mail::factory("mail");

$your_name = $_POST['your_name'];
$email = $_POST['email'];
$question = $_POST['question'];
$comments= $_POST['comments'];
$submit = $_POST['submit'];

$from = "localhost";
$to =  $email;
$subject = "Comments";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: 
$question\n Comments:\n $comments";


$host = "localhost";
$headers = array ('From' => $from,'To' => $to,'Subject' => $subject);
$mail ->send($to, $headers, $body);
if (PEAR::isError($mail)) echo "" . $mail->getMessage() . "";
else {
   echo "Message successfully sent! 
   Thank You For Contacting Us
   We will contact you within the next 24 business 
hours.

   Here is what you have input:
   Your Name is " . $your_name .  "
   Your Email is " . $email . "
   You contacted us because you have a " . $question . 
"

   Here are your comments: " . $comments . "
 Have a Nice Day!";
  }
}

Can anyone on the list please give me some pointers on what might have 
been wrong here? I have not edited anything in the php.ini file 
regarding SMTP.


Thanks.

Alice


Hi, 

Here is the revised version, and I don't think I have experienced any  

> changes in terms of the output on the screen. Plus, I still get no email.


 Comments:\n $comments"; 


$headers =  'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

$headers .= 'Errors-to: ' . "\r\n";

$mail ->send($to, $headers, $body);

if (PEAR::isError($mail)) echo "" . $mail->getMessage() . 
"";


else {

   echo "Message successfully sent! id='main'> 


   Thank You For Contacting Us

   Here is what you have input:

   Your Name is " . $your_name .  
"


   Your Email is " . $email . 
"


   You contacted us because you have a " . 
$question . "


   Here are your comments: " . $comments . 
"


 Have a Nice Day!";

  } 

I have made sure that my $from and $to addresses are different, 

> Could there be anything else wrong here? I have not edited
> anything in php.ini regarding this issue. Would I need to?

Well, it's a Good Thing(tm) to know what those settings are.
Have they changed since your last thread?

KDK


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



Re: [PHP] Mail Function Using PEAR Issues

2010-04-18 Thread Karl DeSaulniers

Is there any need for this line if you are using the Errors-to:  ?
Maybe take it out and see what Errors-to gives you without it.


On Apr 18, 2010, at 9:27 PM, Alice Wei wrote:



if (PEAR::isError($mail)) echo "" . $mail->getMessage() .





OAN - That sendmail script I posted, I know works on Linux servers if  
you want to compare notes with it.


Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com


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



RE: [PHP] Mail Function Using PEAR Issues

2010-04-18 Thread Alice Wei


> Date: Sun, 18 Apr 2010 21:02:29 -0500
> From: k...@daleco.biz
> To: aj...@alumni.iu.edu
> CC: k...@designdrumm.com; php-general@lists.php.net
> Subject: Re: [PHP] Mail Function Using PEAR Issues
> 
> Karl DeSaulniers wrote:
> > Hey Alice,
> > Again, try throwing the MIME in.
> > 
> > $headers  = 'MIME-Version: 1.0' . "\r\n";
> > $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
> 
> Also:
> 
> $headers .= 'Errors-to: ' . "\r\n";
> 
>Which I suggested on your previous thread.  Also, I see you have
> $from set to equal "localhost".  Many SMTP servers will reject this
> I *think*, because "localhost" is a hostname, not a working mailbox.
> Try making $from equal to a real working address - possibly the same
> one as your "Errors-to:" header..
> 
> My $0.02,
> 
> KDK
> 
> > 
> > On Apr 18, 2010, at 10:11 AM, Alice Wei wrote:
> > 
> >>
> >> Hi,
> >>
> >>   After several days, I have rebuilt my system on Linux using Ubuntu, 
> >> installed PEAR and such. Thankfully, when I execute the code, it no 
> >> longer gives me the error that the class is not found. Yet, when I 
> >> submit the form now, I can always see the confirmation message telling 
> >> me that my message has been sent, but I cannot see it even in another 
> >> mailbox.
> >>
> >> Here is the code:
> >>
> >> require_once("Mail.php");
> >> $mail = Mail::factory("mail");
> >>
> >> $your_name = $_POST['your_name'];
> >> $email = $_POST['email'];
> >> $question = $_POST['question'];
> >> $comments= $_POST['comments'];
> >> $submit = $_POST['submit'];
> >>
> >> $from = "localhost";
> >> $to =  $email;
> >> $subject = "Comments";
> >> $body = "From: $your_name\n E-Mail: $email\n Reason Contact: 
> >> $question\n Comments:\n $comments";
> >>
> >> $host = "localhost";
> >> $headers = array ('From' => $from,'To' => $to,'Subject' => $subject);
> >> $mail ->send($to, $headers, $body);
> >> if (PEAR::isError($mail)) echo "" . $mail->getMessage() . "";
> >> else {
> >>echo "Message successfully sent! 
> >>Thank You For Contacting Us
> >>We will contact you within the next 24 business 
> >> hours.
> >>Here is what you have input:
> >>Your Name is " . $your_name .  "
> >>Your Email is " . $email . "
> >>You contacted us because you have a " . $question . 
> >> "
> >>Here are your comments: " . $comments . "
> >>  Have a Nice Day!";
> >>   }
> >> }
> >>
> >> Can anyone on the list please give me some pointers on what might have 
> >> been wrong here? I have not edited anything in the php.ini file 
> >> regarding SMTP.
> >>
> >> Thanks.
> >>
> >> Alice
> 

Hi, 

Here is the revised version, and I don't think I have experienced any changes 
in terms of the output on the screen. Plus, I still get no email. 

' . "\r\n";

$mail ->send($to, $headers, $body);

if (PEAR::isError($mail)) echo "" . $mail->getMessage() . 
"";

else {

   echo "Message successfully sent!  

   Thank You For Contacting Us

   Here is what you have input:

   Your Name is " . $your_name .  
"

   Your Email is " . $email . 
"

   You contacted us because you have a " . 
$question . "

   Here are your comments: " . $comments . 
"

 Have a Nice Day!";

  } 


I have made sure that my $from and $to addresses are different, Could there be 
anything else wrong here? I have not edited anything in php.ini regarding this 
issue. Would I need to?

Thanks for your help.

Alice
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

Re: [PHP] Mail Function Using PEAR Issues

2010-04-18 Thread Kevin Kinsey

Karl DeSaulniers wrote:

Hey Alice,
Again, try throwing the MIME in.

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";


Also:

$headers .= 'Errors-to: ' . "\r\n";

  Which I suggested on your previous thread.  Also, I see you have
$from set to equal "localhost".  Many SMTP servers will reject this
I *think*, because "localhost" is a hostname, not a working mailbox.
Try making $from equal to a real working address - possibly the same
one as your "Errors-to:" header..

My $0.02,

KDK



On Apr 18, 2010, at 10:11 AM, Alice Wei wrote:



Hi,

  After several days, I have rebuilt my system on Linux using Ubuntu, 
installed PEAR and such. Thankfully, when I execute the code, it no 
longer gives me the error that the class is not found. Yet, when I 
submit the form now, I can always see the confirmation message telling 
me that my message has been sent, but I cannot see it even in another 
mailbox.


Here is the code:

require_once("Mail.php");
$mail = Mail::factory("mail");

$your_name = $_POST['your_name'];
$email = $_POST['email'];
$question = $_POST['question'];
$comments= $_POST['comments'];
$submit = $_POST['submit'];

$from = "localhost";
$to =  $email;
$subject = "Comments";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: 
$question\n Comments:\n $comments";


$host = "localhost";
$headers = array ('From' => $from,'To' => $to,'Subject' => $subject);
$mail ->send($to, $headers, $body);
if (PEAR::isError($mail)) echo "" . $mail->getMessage() . "";
else {
   echo "Message successfully sent! 
   Thank You For Contacting Us
   We will contact you within the next 24 business 
hours.

   Here is what you have input:
   Your Name is " . $your_name .  "
   Your Email is " . $email . "
   You contacted us because you have a " . $question . 
"

   Here are your comments: " . $comments . "
 Have a Nice Day!";
  }
}

Can anyone on the list please give me some pointers on what might have 
been wrong here? I have not edited anything in the php.ini file 
regarding SMTP.


Thanks.

Alice



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



Re: [PHP] Mail Function Using PEAR Issues

2010-04-18 Thread Karl DeSaulniers

Hey Alice,
Again, try throwing the MIME in.

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

Karl


On Apr 18, 2010, at 10:11 AM, Alice Wei wrote:



Hi,

  After several days, I have rebuilt my system on Linux using  
Ubuntu, installed PEAR and such. Thankfully, when I execute the  
code, it no longer gives me the error that the class is not found.  
Yet, when I submit the form now, I can always see the confirmation  
message telling me that my message has been sent, but I cannot see  
it even in another mailbox.


Here is the code:

require_once("Mail.php");
$mail = Mail::factory("mail");

$your_name = $_POST['your_name'];
$email = $_POST['email'];
$question = $_POST['question'];
$comments= $_POST['comments'];
$submit = $_POST['submit'];

$from = "localhost";
$to =  $email;
$subject = "Comments";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact:  
$question\n Comments:\n $comments";


$host = "localhost";
$headers = array ('From' => $from,'To' => $to,'Subject' => $subject);
$mail ->send($to, $headers, $body);
if (PEAR::isError($mail)) echo "" . $mail->getMessage() . "";
else {
   echo "Message successfully sent! 
   Thank You For Contacting Us
   We will contact you within the next 24 business hoursb>.

   Here is what you have input:
   Your Name is " . $your_name .  "
   Your Email is " . $email . "
   You contacted us because you have a " .  
$question . "
   Here are your comments: " . $comments . "li>

 Have a Nice Day!";
  }
}

Can anyone on the list please give me some pointers on what might  
have been wrong here? I have not edited anything in the php.ini  
file regarding SMTP.


Thanks.

Alice




_
The New Busy is not the old busy. Search, chat and e-mail from your  
inbox.
http://www.windowslive.com/campaign/thenewbusy? 
ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3


Karl DeSaulniers
Design Drumm
http://designdrumm.com


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