Re: [PHP] Re: Sending PHP mail with Authentication

2013-09-29 Thread Paul M Foster
On Fri, Sep 27, 2013 at 12:06:30AM +0200, Maciek Sokolewicz wrote:

[snip]
 
> I'm sure I'm going to annoy people with this, but I would advise to
> never use PEAR. It's the biggest load of extremely badly coded PHP
> you'll ever find. Creating an SMTP client (with the purpose of just
> sending mail) is very easy to do yourself (and also a good challenge
> if you're not yet very skilled with PHP). Alternatively, you can
> indeed use a package such as PHPMailer; it's not perfect, and quite
> bloated for what you want probably, but it works rather well.
> 

I have to agree on the code bloat. Unless your requirements are
extraordinary (which the OP's are), the native PHP mail() function is
generally quite adequate.

Never thought about creating a PHP email client. Interesting idea...

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

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



[PHP] Re: Sending PHP mail with Authentication

2013-09-26 Thread Maciek Sokolewicz

On 25-9-2013 22:11, dealTek wrote:

Hi All,

Semi newbie email question...

I have used the - mail() — Send mail php function to send email from a site.

now it seems the server is blocking this for safety because I should be using 
authentication

Q: mail() does not have authentication - correct?

Q: So I read from the link below that maybe I should use - PEAR Mail package 
 is this a good choice to send mail with authentication?

...any suggestions for basic sending email with authentication (setup info and 
links also) would be welcome


http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

--
Thanks,
Dave - DealTek
deal...@gmail.com
[db-3]



I'm sure I'm going to annoy people with this, but I would advise to 
never use PEAR. It's the biggest load of extremely badly coded PHP 
you'll ever find. Creating an SMTP client (with the purpose of just 
sending mail) is very easy to do yourself (and also a good challenge if 
you're not yet very skilled with PHP). Alternatively, you can indeed use 
a package such as PHPMailer; it's not perfect, and quite bloated for 
what you want probably, but it works rather well.


- Tul

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



Re: [PHP] Sending PHP mail with Authentication

2013-09-25 Thread Camilo Sperberg
On Wed, Sep 25, 2013 at 11:48 PM, Camilo Sperberg  wrote:
> Another vote for PHPMailer, I have it working several years already
> (authenticating against a Zimbra and Outlook SMTP server) without problems.
>
> Greetings.
>
>
> On Wed, Sep 25, 2013 at 11:12 PM, Aziz Saleh  wrote:
>>
>> Usually if I am using a framework I would use the SMTP library associated
>> with it. If it doesn't have one, I use phpmailer, fast and easy to setup:
>>
>> http://phpmailer.worxware.com/index.php?pg=examplebsmtp
>>
>> Aziz
>>
>>
>> On Wed, Sep 25, 2013 at 4:11 PM, dealTek  wrote:
>>
>> > Hi All,
>> >
>> > Semi newbie email question...
>> >
>> > I have used the - mail() — Send mail php function to send email from a
>> > site.
>> >
>> > now it seems the server is blocking this for safety because I should be
>> > using authentication
>> >
>> > Q: mail() does not have authentication - correct?
>> >
>> > Q: So I read from the link below that maybe I should use - PEAR Mail
>> > package  is this a good choice to send mail with authentication?
>> >
>> > ...any suggestions for basic sending email with authentication (setup
>> > info
>> > and links also) would be welcome
>> >
>> >
>> >
>> >
>> > http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
>> >
>> > --
>> > Thanks,
>> > Dave - DealTek
>> > deal...@gmail.com
>> > [db-3]
>> >
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>
>

Another vote for PHPMailer, I have it working several years already
(authenticating against a Zimbra and Outlook SMTP server) without
problems.

Greetings.

PD: Sorry for previous mail, it has been some time that I haven't used
the webmail interface of gmail :)

-- 
Mailed by:
UnReAl4U - unreal4u
ICQ #: 54472056
www1: http://www.chw.net/
www2: http://unreal4u.com/

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



Re: [PHP] Sending PHP mail with Authentication

2013-09-25 Thread Camilo Sperberg
Another vote for PHPMailer, I have it working several years already
(authenticating against a Zimbra and Outlook SMTP server) without problems.

Greetings.


On Wed, Sep 25, 2013 at 11:12 PM, Aziz Saleh  wrote:

> Usually if I am using a framework I would use the SMTP library associated
> with it. If it doesn't have one, I use phpmailer, fast and easy to setup:
>
> http://phpmailer.worxware.com/index.php?pg=examplebsmtp
>
> Aziz
>
>
> On Wed, Sep 25, 2013 at 4:11 PM, dealTek  wrote:
>
> > Hi All,
> >
> > Semi newbie email question...
> >
> > I have used the - mail() — Send mail php function to send email from a
> > site.
> >
> > now it seems the server is blocking this for safety because I should be
> > using authentication
> >
> > Q: mail() does not have authentication - correct?
> >
> > Q: So I read from the link below that maybe I should use - PEAR Mail
> > package  is this a good choice to send mail with authentication?
> >
> > ...any suggestions for basic sending email with authentication (setup
> info
> > and links also) would be welcome
> >
> >
> >
> >
> http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
> >
> > --
> > Thanks,
> > Dave - DealTek
> > deal...@gmail.com
> > [db-3]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>


Re: [PHP] Sending PHP mail with Authentication

2013-09-25 Thread Aziz Saleh
Usually if I am using a framework I would use the SMTP library associated
with it. If it doesn't have one, I use phpmailer, fast and easy to setup:

http://phpmailer.worxware.com/index.php?pg=examplebsmtp

Aziz


On Wed, Sep 25, 2013 at 4:11 PM, dealTek  wrote:

> Hi All,
>
> Semi newbie email question...
>
> I have used the - mail() — Send mail php function to send email from a
> site.
>
> now it seems the server is blocking this for safety because I should be
> using authentication
>
> Q: mail() does not have authentication - correct?
>
> Q: So I read from the link below that maybe I should use - PEAR Mail
> package  is this a good choice to send mail with authentication?
>
> ...any suggestions for basic sending email with authentication (setup info
> and links also) would be welcome
>
>
>
> http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
>
> --
> Thanks,
> Dave - DealTek
> deal...@gmail.com
> [db-3]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] Sending PHP mail with Authentication

2013-09-25 Thread dealTek
Hi All,

Semi newbie email question...

I have used the - mail() — Send mail php function to send email from a site.

now it seems the server is blocking this for safety because I should be using 
authentication

Q: mail() does not have authentication - correct?

Q: So I read from the link below that maybe I should use - PEAR Mail package 
 is this a good choice to send mail with authentication?

...any suggestions for basic sending email with authentication (setup info and 
links also) would be welcome


http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

--
Thanks,
Dave - DealTek
deal...@gmail.com
[db-3]


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



Re: [PHP] Send php Mail not working in MAMP (non pro version)

2012-10-18 Thread Jim Lucas

On 10/17/2012 05:00 PM, Dave wrote:


Make sure, if you happen to have install postfix as well, that it has
replaced your sendmail.

Then, from the cli, as your apache/php user, try sending an email using
sendmail.

# sendmail -v y...@email.com
testing
.




Thanks a lot Jim for the help...

sorry this is getting a bit above me... if you mean use the terminal I
have a friend that can help me soon try to change user to apache/php
user (not sure how yet) and test this




...

Did it work?

More then likely your php/apache process does not know where sendmail is or
does not have permission to use it.

Check in your php.ini file and see what is set as the sendmail_path

Mine is set like this:

; For Unix only.  You may supply arguments as well (default: "sendmail -t
-i").
;sendmail_path =

As a standard user on my linux box I get this

[jlucas@jim ~]$ which sendmail
/usr/bin/which: no sendmail in (...)

But as root, I get this
[root@jim ~]# which sendmail
/usr/sbin/sendmail

So, make sure your apache&php user can see and execute sendmail

--
Jim Lucas



Ji Jim,

in the mamp php.ini file I had set like the demo to:

[mail function]
; For Win32 only.
;SMTP = localhost - these commented out as described
;smtp_port = 25 - these commented out as described

; For Win32 only.
;sendmail_from = m...@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").

sendmail_path =/usr/sbin/sendmail -t -i -f  m...@site.com



From your terminal, you will need to verify that /usr/sbin/sendmail 
exists and can be called by your apache/php user.






First off, make sure that sendmail is installed and functioning.


I am not using sendmail that I know of. I didn't install anything -
just the basic NON PRO MAMP

Also I did not install postfix.

and I am using the basic php function mail()



You could get around using the mail function completely and use 
phpmailer or SwiftMail.  They would allow you to talk directly to an 
outside SMTP server.  In most cases, unless your web server happens to 
serve as your mail server, you would want to relay your message(s) 
through your official mail server.


--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

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



Re: [PHP] Send php Mail not working in MAMP (non pro version)

2012-10-17 Thread Dave
>
> Make sure, if you happen to have install postfix as well, that it has
> replaced your sendmail.
>
> Then, from the cli, as your apache/php user, try sending an email using
> sendmail.
>
> # sendmail -v y...@email.com
> testing
> .
>


Thanks a lot Jim for the help...

sorry this is getting a bit above me... if you mean use the terminal I
have a friend that can help me soon try to change user to apache/php
user (not sure how yet) and test this



> ...
>
> Did it work?
>
> More then likely your php/apache process does not know where sendmail is or
> does not have permission to use it.
>
> Check in your php.ini file and see what is set as the sendmail_path
>
> Mine is set like this:
>
> ; For Unix only.  You may supply arguments as well (default: "sendmail -t
> -i").
> ;sendmail_path =
>
> As a standard user on my linux box I get this
>
> [jlucas@jim ~]$ which sendmail
> /usr/bin/which: no sendmail in (...)
>
> But as root, I get this
> [root@jim ~]# which sendmail
> /usr/sbin/sendmail
>
> So, make sure your apache&php user can see and execute sendmail
>
> --
> Jim Lucas
>

Ji Jim,

in the mamp php.ini file I had set like the demo to:

[mail function]
; For Win32 only.
;SMTP = localhost - these commented out as described
;smtp_port = 25 - these commented out as described

; For Win32 only.
;sendmail_from = m...@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").

sendmail_path =/usr/sbin/sendmail -t -i -f  m...@site.com



--



>
> First off, make sure that sendmail is installed and functioning.

I am not using sendmail that I know of. I didn't install anything -
just the basic NON PRO MAMP

Also I did not install postfix.

and I am using the basic php function mail()

-- 
Thanks - Dave

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



Re: [PHP] Send php Mail not working in MAMP (non pro version)

2012-10-17 Thread Jim Lucas

On 10/17/2012 09:52 AM, Dave wrote:

Hi all,

MAC LION 10.7.4&  latest MAMP (non pro version)

I've tried various things - but php send mail not working in MAMP (non
pro version)

... mail ( string $to , string $subject , string $message [, string
$additional_headers [, string $additional_parameters ]] )

the same script works on a hosted server...

tried this but not working...

viewtopic.php?f=2&t=10722

seems like I need to add more data - somewhere in php.ini or the php
sendmail script like authentication info of mailhost and user /
pass and port etc

maybe setting data here? --- [, string $additional_headers [, string
$additional_parameters ]] - i don't know how..


I also posted this at mamp forum but there does not seem much action there...

http://forum.mamp.info/viewtopic.php?f=2&t=37583&p=53515#p53515





First off, make sure that sendmail is installed and functioning.

Make sure, if you happen to have install postfix as well, that it has 
replaced your sendmail.


Then, from the cli, as your apache/php user, try sending an email using 
sendmail.


# sendmail -v y...@email.com
testing
.

...

Did it work?

More then likely your php/apache process does not know where sendmail is 
or does not have permission to use it.


Check in your php.ini file and see what is set as the sendmail_path

Mine is set like this:

; For Unix only.  You may supply arguments as well (default: "sendmail 
-t -i").

;sendmail_path =

As a standard user on my linux box I get this

[jlucas@jim ~]$ which sendmail
/usr/bin/which: no sendmail in (...)

But as root, I get this
[root@jim ~]# which sendmail
/usr/sbin/sendmail

So, make sure your apache&php user can see and execute sendmail

--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

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



[PHP] Send php Mail not working in MAMP (non pro version)

2012-10-17 Thread Dave
Hi all,

MAC LION 10.7.4 & latest MAMP (non pro version)

I've tried various things - but php send mail not working in MAMP (non
pro version)

... mail ( string $to , string $subject , string $message [, string
$additional_headers [, string $additional_parameters ]] )

the same script works on a hosted server...

tried this but not working...

viewtopic.php?f=2&t=10722

seems like I need to add more data - somewhere in php.ini or the php
sendmail script like authentication info of mailhost and user /
pass and port etc

maybe setting data here? --- [, string $additional_headers [, string
$additional_parameters ]] - i don't know how..


I also posted this at mamp forum but there does not seem much action there...

http://forum.mamp.info/viewtopic.php?f=2&t=37583&p=53515#p53515



-- 
Thanks - Dave

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



Re: [PHP] mail() function on Windows (WAMP Server)

2011-01-06 Thread Daniel Brown
On Thu, Jan 6, 2011 at 16:10, David Armstrong  wrote:
> Thanks Daniel.  I will suggest that to the developer and see if we can get
> some useful information to further the troubleshooting process.

>> >>    Per list rules, please hit "reply-all" and post your response
>> >> below the quoted email in the future.  Thanks.

You bet.  Sorry about the missing references from the other email,
by the way.  I was on the phone and clicked "Send" a bit too hastily.

^1: http://php.net/debug_print_backtrace
^2: http://xdebug.org/

-- 

Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

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



Re: [PHP] mail() function on Windows (WAMP Server)

2011-01-06 Thread David Armstrong
Thanks Daniel.  I will suggest that to the developer and see if we can get
some useful information to further the troubleshooting process.

On Thu, Jan 6, 2011 at 1:08 PM, Daniel Brown  wrote:

> On Thu, Jan 6, 2011 at 16:02, David Armstrong 
> wrote:
> > I modified the php.ini in both the apache/bin directory, and also the php
> > directory.
> > Is there some way to get a trace of the code execution?  The SMTP log
> files
> > are completely worthless.  They do not show any sort of connection
> attempt.
>
> >>Per list rules, please hit "reply-all" and post your response
> >> below the quoted email in the future.  Thanks.
>
>You can do a debug_print_backtrace()[1] call right after the call
> to mail(), or you can use a profiler like Xdebug[2].  You can also
> check the Apache error log to see if anything popped up.  It'll be
> more helpful if you have error_reporting set to E_ALL, mind you.  If
> you just want to see if mail() is encountering any errors itself, wrap
> the call in an `if` condition block:
>
> 
> if (!mail($to,$subject,$body,$headers)) {
>die('Call to mail() failed in '.__FILE__.'#'.(__LINE__ -
> 1).'.'.PHP_EOL);
> }
> ?>
>
> --
>  
> Network Infrastructure Manager
> Documentation, Webmaster Teams
> http://www.php.net/
>


Re: [PHP] mail() function on Windows (WAMP Server)

2011-01-06 Thread Daniel Brown
On Thu, Jan 6, 2011 at 16:02, David Armstrong  wrote:
> I modified the php.ini in both the apache/bin directory, and also the php
> directory.
> Is there some way to get a trace of the code execution?  The SMTP log files
> are completely worthless.  They do not show any sort of connection attempt.

>>Per list rules, please hit "reply-all" and post your response
>> below the quoted email in the future.  Thanks.

You can do a debug_print_backtrace()[1] call right after the call
to mail(), or you can use a profiler like Xdebug[2].  You can also
check the Apache error log to see if anything popped up.  It'll be
more helpful if you have error_reporting set to E_ALL, mind you.  If
you just want to see if mail() is encountering any errors itself, wrap
the call in an `if` condition block:



-- 

Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

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



Re: [PHP] mail() function on Windows (WAMP Server)

2011-01-06 Thread David Armstrong
I modified the php.ini in both the apache/bin directory, and also the php
directory.

Is there some way to get a trace of the code execution?  The SMTP log files
are completely worthless.  They do not show any sort of connection attempt.

On Thu, Jan 6, 2011 at 12:58 PM, Daniel Brown  wrote:

> On Thu, Jan 6, 2011 at 15:50, David Armstrong 
> wrote:
> > I set the following parameters
> >
> > [mail function]
> > ; For Win32 only.
> > ; http://php.net/smtp
> > SMTP = localhost
> > ; http://php.net/smtp-port
> > smtp_port = 25
> > sendmail_from = 
>
>Per list rules, please hit "reply-all" and post your response
> below the quoted email in the future.  Thanks.
>
>Did you set these as such before or after you last tested?  And
> did you restart Apache/IIS after saving your changes to the php.ini
> file?  And lastly, are you certain you edited the correct php.ini
> file?  If accessing the script via the web, check out the
> Configuration File Path and, specifically, the Loaded Configuration
> File entries in your phpinfo() output.
>
> --
>  
> Network Infrastructure Manager
> Documentation, Webmaster Teams
> http://www.php.net/
>


Re: [PHP] mail() function on Windows (WAMP Server)

2011-01-06 Thread Daniel Brown
On Thu, Jan 6, 2011 at 15:50, David Armstrong  wrote:
> I set the following parameters
>
> [mail function]
> ; For Win32 only.
> ; http://php.net/smtp
> SMTP = localhost
> ; http://php.net/smtp-port
> smtp_port = 25
> sendmail_from = 

Per list rules, please hit "reply-all" and post your response
below the quoted email in the future.  Thanks.

Did you set these as such before or after you last tested?  And
did you restart Apache/IIS after saving your changes to the php.ini
file?  And lastly, are you certain you edited the correct php.ini
file?  If accessing the script via the web, check out the
Configuration File Path and, specifically, the Loaded Configuration
File entries in your phpinfo() output.

-- 

Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

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



Re: [PHP] mail() function on Windows (WAMP Server)

2011-01-06 Thread Daniel Brown
On Thu, Jan 6, 2011 at 15:27, David Armstrong  wrote:
> I'm in the process of helping some developers port their php application
> from Linux to Windows (I know, string me up from the flag pole later).  I
> have setup WAMP and everything is working fine with the exception of the
> mail() function.  The code was originally developed on Linux and leveraged
> sendmail for the mail() function.
>
> What can I do to allow the php code to send mail from Windows?  I have
> already tried installing the IIS SMTP service and that has not worked so
> far.  The Windows box is Server 2008 R2 Standard, so IIS is 7.5 with the IIS
> 6.0 SMTP component.

Did you update your php.ini on the WIMP/WAMP box to use SMTPm and
to properly configure it for the server?

-- 

Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

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



[PHP] mail() function on Windows (WAMP Server)

2011-01-06 Thread David Armstrong
I'm in the process of helping some developers port their php application
from Linux to Windows (I know, string me up from the flag pole later).  I
have setup WAMP and everything is working fine with the exception of the
mail() function.  The code was originally developed on Linux and leveraged
sendmail for the mail() function.

What can I do to allow the php code to send mail from Windows?  I have
already tried installing the IIS SMTP service and that has not worked so
far.  The Windows box is Server 2008 R2 Standard, so IIS is 7.5 with the IIS
6.0 SMTP component.


Re: [PHP] php mail() and sendmail/smtp

2010-12-02 Thread Daniel P. Brown
2010/12/2 Michael Crowl :
>
> Possible solutions?  I'm a little frazzled and a little undereducated here.

Use the under-appreciated fifth paramter in mail() to pass the -f
flag to sendmail, like so:



-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] php mail() and sendmail/smtp

2010-12-02 Thread Peter Lind
2010/12/2 Michael Crowl :

* snip *

> Also, we
> have Redmine running on the same server, and it sends admin emails out just
> fine - however, I don't think it calls sendmail directly like our PHP
> install, but connects directly to the local SMTP server.

Sounds like a solution to me: connect to port 25 on the mail server
instead of going through sendmail. Plenty of good mail libraries out
there (swiftmailer, phpmailer come to mind).

Regards
Peter

-- 

WWW: plphp.dk / plind.dk
LinkedIn: plind
BeWelcome/Couchsurfing: Fake51
Twitter: kafe15


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



[PHP] php mail() and sendmail/smtp

2010-12-02 Thread Michael Crowl


Okay, I know this is a Sendmail/SMTP admin issue, but it's PHP-related 
and I figured someone here might have a clue or might have solved this 
issue before.  I've come into this dev server after many hands have 
touched it, and I'm not quite sure how to proceed, nor am I a Linux genius.


We're using localhost on this in-house CentOS server for mail() with 
sendmail_path, sendmail_from, etc. set properly.  I can get test emails 
sent to me using mail(), but my client can't get any script emails on 
their domain's mail server, which is on hostmonster.


The daemon response emails are stuck in the queue as deferred - and what 
I've found through logs is that they're being rejected by the client's 
mail server because SMTP is sending it FROM 
"", even though that should be overridden 
when using mail() and our ini settings and headers.  So that's a 
compound address of the apache account and 'new-host' which was 
apparently the machine name that was never changed in the beginning.


My mail server apparently doesn't care that it can't do a reverse lookup 
on that non-existent subdomain and account, but the client's does.  
Also, we have Redmine running on the same server, and it sends admin 
emails out just fine - however, I don't think it calls sendmail directly 
like our PHP install, but connects directly to the local SMTP server.


And I have tested a local telnet session to SMTP a mail manually, and 
that got through fine.  So it seems to be how PHP is calling Sendmail, 
or Sendmail itself.


Sendmail is being called as "/usr/sbin/sendmail -t -i" in the ini.

Possible solutions?  I'm a little frazzled and a little undereducated here.

-- m


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



Re: [PHP] mail() + localhost

2010-07-01 Thread Shreyas Agasthya
Trying again; most likely I cannot do this without SSL.

--Shreyas

On Thu, Jul 1, 2010 at 8:42 PM, Shreyas Agasthya wrote:

> Not sure where I am top-posting. I posted to my own mail so that one gets
> to know the latest. Nevertheless, I wouldn't go against the guidelines as I
> completely understand the havoc that it can create.
>
> The port is 587 as per Google; SMTP that I am using
> is Google's (anything wrong here?). If there is a rudimentary mistake that I
> am doing, please guide me.
>
> Regards,
> Shreyas
>
> On Thu, Jul 1, 2010 at 7:46 PM, Daniel Brown  wrote:
>
>> On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya 
>> wrote:
>> > Spoke too fast.
>> >
>> > Fixed that (SMTP has to be uppercase)
>> >
>> > Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS
>> command
>> > first. c15sm7128213rvi.11*
>>
>>(Quick note: per the list guidelines, please don't top-post in
>> threads.)
>>
>>That error message is because you're trying to connect to an SMTPS
>> (secure, SSL-encrypted SMTP) server using plain text, which won't
>> work.  If you have a plain SMTP server running, try that to get one
>> thing resolved at a time.  Change the port to 25 in your php.ini (and,
>> again, restart Apache) if plain SMTP is available on the default port.
>>
>> --
>> 
>> UNADVERTISED DEDICATED SERVER SPECIALS
>> SAME-DAY SETUP
>> Just ask me what we're offering today!
>> daniel.br...@parasane.net || danbr...@php.net
>> http://www.parasane.net/ || http://www.pilotpig.net/
>>
>
>
>
> --
> Regards,
> Shreyas Agasthya
>



-- 
Regards,
Shreyas Agasthya


Re: [PHP] mail() + localhost

2010-07-01 Thread Shreyas Agasthya
Not sure where I am top-posting. I posted to my own mail so that one gets to
know the latest. Nevertheless, I wouldn't go against the guidelines as I
completely understand the havoc that it can create.

The port is 587 as per Google; SMTP that I am using
is Google's (anything wrong here?). If there is a rudimentary mistake that I
am doing, please guide me.

Regards,
Shreyas

On Thu, Jul 1, 2010 at 7:46 PM, Daniel Brown  wrote:

> On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya 
> wrote:
> > Spoke too fast.
> >
> > Fixed that (SMTP has to be uppercase)
> >
> > Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS
> command
> > first. c15sm7128213rvi.11*
>
>(Quick note: per the list guidelines, please don't top-post in threads.)
>
>That error message is because you're trying to connect to an SMTPS
> (secure, SSL-encrypted SMTP) server using plain text, which won't
> work.  If you have a plain SMTP server running, try that to get one
> thing resolved at a time.  Change the port to 25 in your php.ini (and,
> again, restart Apache) if plain SMTP is available on the default port.
>
> --
> 
> UNADVERTISED DEDICATED SERVER SPECIALS
> SAME-DAY SETUP
> Just ask me what we're offering today!
> daniel.br...@parasane.net || danbr...@php.net
> http://www.parasane.net/ || http://www.pilotpig.net/
>



-- 
Regards,
Shreyas Agasthya


Re: [PHP] mail() + localhost

2010-07-01 Thread Daniel Brown
On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya  wrote:
> Spoke too fast.
>
> Fixed that (SMTP has to be uppercase)
>
> Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS command
> first. c15sm7128213rvi.11*

(Quick note: per the list guidelines, please don't top-post in threads.)

That error message is because you're trying to connect to an SMTPS
(secure, SSL-encrypted SMTP) server using plain text, which won't
work.  If you have a plain SMTP server running, try that to get one
thing resolved at a time.  Change the port to 25 in your php.ini (and,
again, restart Apache) if plain SMTP is available on the default port.

-- 

UNADVERTISED DEDICATED SERVER SPECIALS
SAME-DAY SETUP
Just ask me what we're offering today!
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/

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



Re: [PHP] mail() + localhost

2010-07-01 Thread Shreyas Agasthya
Spoke too fast.

Fixed that (SMTP has to be uppercase)

Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS command
first. c15sm7128213rvi.11*

On Thu, Jul 1, 2010 at 7:25 PM, Shreyas Agasthya wrote:

> Erm... understood.
>
> I modified the changes to look like this in the "php.ini" file (the right
> one based on the output of phpinfo()).
>
> 3)
> *smtp = smtp.gmail.com*
> *smtp_port = 587*
> *
> *
> *I get : "Failed to connect to mailserver at "localhost" port 587, verify
> your "SMTP" and "smtp_port" setting in php.ini"*
> *
> *
> Regards,
> Shreyas
>
> On Thu, Jul 1, 2010 at 7:03 PM, Daniel Brown  wrote:
>
>> On Thu, Jul 1, 2010 at 09:09, Shreyas Agasthya 
>> wrote:
>> >
>> > All I am trying to do is send a mail from my localhost to my Gmail ID. I
>> > read stuff about how the SMTP port should be accessible; should be open
>> et
>> > al. My set-up is very simple:
>> >
>> > 1. Using Easy PHP.
>> > 2. Windows XP
>>
>> 3.) An SMTP server, I hope...?
>>
>> > Also, when the comment says that you need to 'configure' your php.ini,
>> which
>> > .ini should I modify? The reason being, I see that file in two
>> locations,
>> > apparently.
>> > (i) C:\Program Files\EasyPHP 3.0\apache
>> > (ii) C:\Program Files\EasyPHP 3.0\conf_files
>>
>> In a browser, check the output of phpinfo() - specifically, the
>> value for "Loaded Configuration File" - and modify that, as the other
>> may be for the PHP CLI, another installed component using a local
>> override, or may not even be used at all.
>>
>> > *My php.ini (will remove the semi-colon)*
>> > *
>> > *
>> > ; For Win32 only.
>> > ;SMTP = localhost
>> > ;smtp_port = 25
>>
>> Uncomment the two lines above.
>>
>> > ; For Win32 only.
>> > ;sendmail_from = m...@example.com
>>
>> You don't *need* to uncomment and set the `sendmail_from` option,
>> as long as you set an explicit `From` header in your code.  More on
>> that after your snippet.
>>
>> > *My  code: *
>> > *
>> > *
>> > *
>> > > > *
>> >
>> > $from= "shreya...@gmail.com";
>> > $to ="shreya...@gmail.com";
>> > $subject = "PHP Testing";
>> > $message = "Test Me";
>> > mail ($to,$subject,$message,'From:'.$from);
>> > ?>
>>
>> Your code should be modified just a bit for better conformance and
>> portability, but I understand that you're just using it as a test.
>> After following the suggestions above (and remembering to restart
>> Apache, of course), try this:
>>
>> >
>>  $from = "sherya...@gmail.com";
>>
>>  // Gmail allows (\+[a-z0-9\.\-_]+) appended to your username to
>> filter emails in your Gmail box.
>>  $to = "shreyasbr+phpt...@gmail.com ";
>>
>>  // This will append (at the moment, my local time) 1 Jul 2010, 09:27:23
>>  $subject = "PHP Testing ".date("j M Y, H:i:s");
>>
>>  $message = "Test Me.";
>>
>>  // Create your headers, remembering to terminate each line with CRLF
>> (\r\n) to comply with RFC [2]821.
>>  $headers  = "From: ".$from."\r\n";
>>  $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
>>
>>  // Send it, or inform us of an error.  No need to use a -f flag here.
>>  if (!mail($to,$subject,$body,$headers)) {
>>echo "Ah, crap.  Something's SNAFU'd here.";
>>exit(-1);
>>  }
>> ?>
>>
>> --
>> 
>> UNADVERTISED DEDICATED SERVER SPECIALS
>> SAME-DAY SETUP
>> Just ask me what we're offering today!
>> daniel.br...@parasane.net || danbr...@php.net
>> http://www.parasane.net/ || http://www.pilotpig.net/
>>
>
>
>
> --
> Regards,
> Shreyas Agasthya
>



-- 
Regards,
Shreyas Agasthya


Re: [PHP] mail() + localhost

2010-07-01 Thread Shreyas Agasthya
Erm... understood.

I modified the changes to look like this in the "php.ini" file (the right
one based on the output of phpinfo()).

3)
*smtp = smtp.gmail.com*
*smtp_port = 587*
*
*
*I get : "Failed to connect to mailserver at "localhost" port 587, verify
your "SMTP" and "smtp_port" setting in php.ini"*
*
*
Regards,
Shreyas

On Thu, Jul 1, 2010 at 7:03 PM, Daniel Brown  wrote:

> On Thu, Jul 1, 2010 at 09:09, Shreyas Agasthya 
> wrote:
> >
> > All I am trying to do is send a mail from my localhost to my Gmail ID. I
> > read stuff about how the SMTP port should be accessible; should be open
> et
> > al. My set-up is very simple:
> >
> > 1. Using Easy PHP.
> > 2. Windows XP
>
> 3.) An SMTP server, I hope...?
>
> > Also, when the comment says that you need to 'configure' your php.ini,
> which
> > .ini should I modify? The reason being, I see that file in two locations,
> > apparently.
> > (i) C:\Program Files\EasyPHP 3.0\apache
> > (ii) C:\Program Files\EasyPHP 3.0\conf_files
>
> In a browser, check the output of phpinfo() - specifically, the
> value for "Loaded Configuration File" - and modify that, as the other
> may be for the PHP CLI, another installed component using a local
> override, or may not even be used at all.
>
> > *My php.ini (will remove the semi-colon)*
> > *
> > *
> > ; For Win32 only.
> > ;SMTP = localhost
> > ;smtp_port = 25
>
> Uncomment the two lines above.
>
> > ; For Win32 only.
> > ;sendmail_from = m...@example.com
>
> You don't *need* to uncomment and set the `sendmail_from` option,
> as long as you set an explicit `From` header in your code.  More on
> that after your snippet.
>
> > *My  code: *
> > *
> > *
> > *
> >  > *
> >
> > $from= "shreya...@gmail.com";
> > $to ="shreya...@gmail.com";
> > $subject = "PHP Testing";
> > $message = "Test Me";
> > mail ($to,$subject,$message,'From:'.$from);
> > ?>
>
> Your code should be modified just a bit for better conformance and
> portability, but I understand that you're just using it as a test.
> After following the suggestions above (and remembering to restart
> Apache, of course), try this:
>
> 
>  $from = "sherya...@gmail.com";
>
>  // Gmail allows (\+[a-z0-9\.\-_]+) appended to your username to
> filter emails in your Gmail box.
>  $to = "shreyasbr+phpt...@gmail.com ";
>
>  // This will append (at the moment, my local time) 1 Jul 2010, 09:27:23
>  $subject = "PHP Testing ".date("j M Y, H:i:s");
>
>  $message = "Test Me.";
>
>  // Create your headers, remembering to terminate each line with CRLF
> (\r\n) to comply with RFC [2]821.
>  $headers  = "From: ".$from."\r\n";
>  $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
>
>  // Send it, or inform us of an error.  No need to use a -f flag here.
>  if (!mail($to,$subject,$body,$headers)) {
>echo "Ah, crap.  Something's SNAFU'd here.";
>exit(-1);
>  }
> ?>
>
> --
> 
> UNADVERTISED DEDICATED SERVER SPECIALS
> SAME-DAY SETUP
> Just ask me what we're offering today!
> daniel.br...@parasane.net || danbr...@php.net
> http://www.parasane.net/ || http://www.pilotpig.net/
>



-- 
Regards,
Shreyas Agasthya


Re: [PHP] mail() + localhost

2010-07-01 Thread Daniel Brown
On Thu, Jul 1, 2010 at 09:09, Shreyas Agasthya  wrote:
>
> All I am trying to do is send a mail from my localhost to my Gmail ID. I
> read stuff about how the SMTP port should be accessible; should be open et
> al. My set-up is very simple:
>
> 1. Using Easy PHP.
> 2. Windows XP

3.) An SMTP server, I hope...?

> Also, when the comment says that you need to 'configure' your php.ini, which
> .ini should I modify? The reason being, I see that file in two locations,
> apparently.
> (i) C:\Program Files\EasyPHP 3.0\apache
> (ii) C:\Program Files\EasyPHP 3.0\conf_files

In a browser, check the output of phpinfo() - specifically, the
value for "Loaded Configuration File" - and modify that, as the other
may be for the PHP CLI, another installed component using a local
override, or may not even be used at all.

> *My php.ini (will remove the semi-colon)*
> *
> *
> ; For Win32 only.
> ;SMTP = localhost
> ;smtp_port = 25

Uncomment the two lines above.

> ; For Win32 only.
> ;sendmail_from = m...@example.com

You don't *need* to uncomment and set the `sendmail_from` option,
as long as you set an explicit `From` header in your code.  More on
that after your snippet.

> *My  code: *
> *
> *
> *
>  *
>
> $from= "shreya...@gmail.com";
> $to ="shreya...@gmail.com";
> $subject = "PHP Testing";
> $message = "Test Me";
> mail ($to,$subject,$message,'From:'.$from);
> ?>

Your code should be modified just a bit for better conformance and
portability, but I understand that you're just using it as a test.
After following the suggestions above (and remembering to restart
Apache, of course), try this:



-- 

UNADVERTISED DEDICATED SERVER SPECIALS
SAME-DAY SETUP
Just ask me what we're offering today!
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/

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



Re: [PHP] mail() + localhost

2010-07-01 Thread Andrew Ballard
On Thu, Jul 1, 2010 at 9:09 AM, Shreyas Agasthya  wrote:
> Also, when the comment says that you need to 'configure' your php.ini, which
> .ini should I modify? The reason being, I see that file in two locations,
> apparently.
> (i) C:\Program Files\EasyPHP 3.0\apache
> (ii) C:\Program Files\EasyPHP 3.0\conf_files

Call this in a script running under your web server:

http://www.php.net/phpinfo


Alternatively, you could also look at these:

http://www.php.net/php-ini-loaded-file
http://www.php.net/php-ini-scanned-files


Andrew

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



[PHP] mail() + localhost

2010-07-01 Thread Shreyas Agasthya
PHP'ers,

I am sure this would have been asked a zillion times but I take this as my
turn to get some help. I hate to ask such rhetorical questions but quite
couldn't understand how to tweak this.

All I am trying to do is send a mail from my localhost to my Gmail ID. I
read stuff about how the SMTP port should be accessible; should be open et
al. My set-up is very simple:

1. Using Easy PHP.
2. Windows XP

Also, when the comment says that you need to 'configure' your php.ini, which
.ini should I modify? The reason being, I see that file in two locations,
apparently.
(i) C:\Program Files\EasyPHP 3.0\apache
(ii) C:\Program Files\EasyPHP 3.0\conf_files


*My php.ini (will remove the semi-colon)*
*
*
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = m...@example.com

*My  code: *
*
*
*

*
*
*
Regards,
*Shreyas Agasthya


Re: [PHP] mail command failing

2010-06-29 Thread Ashley Sheridan
On Tue, 2010-06-29 at 10:27 -0700, Mike Wright wrote:

> Ashley Sheridan wrote:
> > On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote:
> > 
> >> Hi all,
> >>
> >> I'm very puzzled by this.  I've been using the php mail command for 
> >> years but now I can't get it to work and can't figure out how to 
> >> diagnose the problem.
> >>
> >>
> >> php-5.2.29 on fedora10 with apache 2.2.14.  Can this be selinux related?
> >>
> > 
> > The first ini_set variable you're setting I believe will only work for a
> > Windows server.
> > 
> > Aside from that, yes SELinux does prevent the mail command from sending
> > mail by default. I'm using Fedora 11, so I assume it will be similar;
> > there are config tools for setting SELinux policies, or you could even
> > turn it off (not advised on a live server). As a test, try turning it
> > off temporarily just to see if it is the culprit, then you can determine
> > what policy changes need to be made.
> > 
> 
> Thanks, Ash, but no cigar.  Selinux is set disabled.  Absolutely baffled 
> and confounded that there doesn't seem to be a way to diagnose the problem.
> 
> Mike
> 


I can only guess that PHP somehow isn't seeing the sendmail program for
some reason. Have you compared the output of a phpinfo() call on this
system and another where it is working to see if there are any obvious
differences in the server setups?

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




RE: [PHP] mail command failing

2010-06-29 Thread Bob McConnell
From: Ashley Sheridan

> On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote:
> 
>> Hi all,
>> 
>> I'm very puzzled by this.  I've been using the php mail command for 
>> years but now I can't get it to work and can't figure out how to 
>> diagnose the problem.
>> 
>> The code below was copied from the manual (addresses changed, etc); 
>> php.ini has safe_mode off; binary is at /usr/sbin/sendmail.
>> 
>> > ini_set("SMTP","localhost" );
>> ini_set('sendmail_from', 'mike.wri...@mailinator.com');
>> 
>> $name = "Mike Wright"; //senders name
>> $email = "mike.wri...@mailinator.com"; //senders e-mail adress
>> $recipient = "mike.wri...@mailinator.com"; //recipient
>> $body = "The text for the mail..."; //mail body
>> $subject = "Subject for review"; //subject
>> $header = "From: $name <$email>\r\n"; //optional headerfields
>> 
>> $echo = mail($recipient, $subject, $body, $header) ?
'success':'fail';
>> echo "$echo";
>> 
>> I can access the mail server with "/usr/bin/mailx" and by telnet 
>> "localhost 25".  I can also send mail using php by using 'exec ("
echo 
>> $body | mailx -s $subject $recipient")'.
>> 
>> php-5.2.29 on fedora10 with apache 2.2.14.  Can this be selinux
related?
>> 
>> Any ideas or troubleshooting tips?
> 
> 
> The first ini_set variable you're setting I believe will
> only work for a Windows server.
> 
> Aside from that, yes SELinux does prevent the mail command from
sending
> mail by default. I'm using Fedora 11, so I assume it will be similar;
> there are config tools for setting SELinux policies, or you could even
> turn it off (not advised on a live server). As a test, try turning it
> off temporarily just to see if it is the culprit, then you can
determine
> what policy changes need to be made.

Don't turn it off, set it for Permissive mode. It will both allow the
connection and log why it wouldn't allow it in normal operation. Then
you can review the logs and make the necessary adjustments.

Bob McConnell

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



Re: [PHP] mail command failing

2010-06-29 Thread Mike Wright

Ashley Sheridan wrote:

On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote:


Hi all,

I'm very puzzled by this.  I've been using the php mail command for 
years but now I can't get it to work and can't figure out how to 
diagnose the problem.



php-5.2.29 on fedora10 with apache 2.2.14.  Can this be selinux related?



The first ini_set variable you're setting I believe will only work for a
Windows server.

Aside from that, yes SELinux does prevent the mail command from sending
mail by default. I'm using Fedora 11, so I assume it will be similar;
there are config tools for setting SELinux policies, or you could even
turn it off (not advised on a live server). As a test, try turning it
off temporarily just to see if it is the culprit, then you can determine
what policy changes need to be made.



Thanks, Ash, but no cigar.  Selinux is set disabled.  Absolutely baffled 
and confounded that there doesn't seem to be a way to diagnose the problem.


Mike

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



Re: [PHP] mail command failing

2010-06-29 Thread Ashley Sheridan
On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote:

> Hi all,
> 
> I'm very puzzled by this.  I've been using the php mail command for 
> years but now I can't get it to work and can't figure out how to 
> diagnose the problem.
> 
> The code below was copied from the manual (addresses changed, etc); 
> php.ini has safe_mode off; binary is at /usr/sbin/sendmail.
> 
>  ini_set("SMTP","localhost" );
> ini_set('sendmail_from', 'mike.wri...@mailinator.com');
> 
> $name = "Mike Wright"; //senders name
> $email = "mike.wri...@mailinator.com"; //senders e-mail adress
> $recipient = "mike.wri...@mailinator.com"; //recipient
> $body = "The text for the mail..."; //mail body
> $subject = "Subject for review"; //subject
> $header = "From: $name <$email>\r\n"; //optional headerfields
> 
> $echo = mail($recipient, $subject, $body, $header) ? 'success':'fail';
> echo "$echo";
> 
> I can access the mail server with "/usr/bin/mailx" and by telnet 
> "localhost 25".  I can also send mail using php by using 'exec (" echo 
> $body | mailx -s $subject $recipient")'.
> 
> php-5.2.29 on fedora10 with apache 2.2.14.  Can this be selinux related?
> 
> Any ideas or troubleshooting tips?
> 
> Thanks,
> Mike Wright
> 


The first ini_set variable you're setting I believe will only work for a
Windows server.

Aside from that, yes SELinux does prevent the mail command from sending
mail by default. I'm using Fedora 11, so I assume it will be similar;
there are config tools for setting SELinux policies, or you could even
turn it off (not advised on a live server). As a test, try turning it
off temporarily just to see if it is the culprit, then you can determine
what policy changes need to be made.

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




[PHP] mail command failing

2010-06-29 Thread Mike Wright

Hi all,

I'm very puzzled by this.  I've been using the php mail command for 
years but now I can't get it to work and can't figure out how to 
diagnose the problem.


The code below was copied from the manual (addresses changed, etc); 
php.ini has safe_mode off; binary is at /usr/sbin/sendmail.


\r\n"; //optional headerfields

$echo = mail($recipient, $subject, $body, $header) ? 'success':'fail';
echo "$echo";

I can access the mail server with "/usr/bin/mailx" and by telnet 
"localhost 25".  I can also send mail using php by using 'exec (" echo 
$body | mailx -s $subject $recipient")'.


php-5.2.29 on fedora10 with apache 2.2.14.  Can this be selinux related?

Any ideas or troubleshooting tips?

Thanks,
Mike Wright

--
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: 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



[PHP] Mail Function Using PEAR Issues

2010-04-18 Thread Alice Wei

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



  
_
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 Problem

2010-04-13 Thread Ashley Sheridan
On Tue, 2010-04-13 at 08:59 -0400, Alice Wei wrote:

> 
> Subject: RE: [PHP] Mail Function Problem
> From: a...@ashleysheridan.co.uk
> To: aj...@alumni.iu.edu
> CC: k...@daleco.biz; a.bovane...@gmail.com; php-general@lists.php.net
> Date: Tue, 13 Apr 2010 13:19:15 +0100
> 
> 
> 
> 
> 
> 
>   
>   
> 
> 
> On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote:
> 
> 
> 
> 
> 
> 
> > Date: Mon, 12 Apr 2010 11:09:42 -0500
> > From: k...@daleco.biz
> > To: aj...@alumni.iu.edu
> > CC: a.bovane...@gmail.com; php-general@lists.php.net
> > Subject: Re: [PHP] Mail Function Problem
> > 
> > Alice Wei wrote:
> > >> Hi!
> > >> You have the following php.ini params:SMTP = smtp.live.com
> > >> 
> > >> smtp_port = 587
> > >> live.com not support relay and it requires authentication.
> > > 
> > > Is there an email account that I could try? I thought 
> >  > most email accounts requires authentication anyway.
> > 
> > Well, "therein lies the rub," as the Bard said (maybe).
> > PHP's mail() was built on a general assumption that
> > there would be a local SMTP server.  It supports remote
> > SMTP, but I'm not aware of any ability to do SMTP auth,
> > even in the PEAR packages.
> > 
> > You might just wanna read up on mail in general.  The
> > php.net/mail page lists several relevant RFC's, and
> > has links to most of the PEAR mail classes, etc.
> > 
> > You should definitely read up on live.com's email
> > configuration.  If they use SMTP auth, I'm not sure
> > you can do this (per above).  If it uses, say, "POP
> > before SMTP" for authorization, you might be able to
> > hack something together with the PHP IMAP functions, or
> > even sockets, but you're getting into a big lotta work
> > for what seems a small thing.
> > 
> 
> This is what I am talking about. 
> Two years ago when I first set up my own server with Linux and not Windows, I 
> never had to deal with this. 
> Perhaps the authentication has since then got stricter, but it should not be 
> so much of a heck of a deal. 
> 
> I found this doc from ATT's website, 
> http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the 
> smtp server I provided earlier is probably not up to date. 
> 
> I think I will fiddle around with the php.ini file and see what else is 
> there. 
> Thanks.
> 
> 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
> 
> 
> 
> 
> Linux installations come with sendmail which allows you to send email 
> directly. Windows doesn't have this as part of the base setup, but I believe 
> if you can install a local mail server then this should fix the issue.
> 
> Something like http://www.hmailserver.com/? I use AT&T, why is it that I use 
> their SMTP server and my From address in PHP.ini file didn't work?
> 
> Thanks. 
> 
> Alice
> 
> 
> 
> 
> 
> 
> Thanks,sh
> 
> http://www.ashleysheridan.co.uk
> 
> 
> 
> 
> 
> 
> 
> 
> _
> 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


That looks to do what you need. I don't really know of any specific
other examples as it's been a while since I've used Windows for anything
now. The link you gave did say it was free though, so you don't really
have anything to lose by installing it.

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




RE: [PHP] Mail Function Problem

2010-04-13 Thread Alice Wei


Subject: RE: [PHP] Mail Function Problem
From: a...@ashleysheridan.co.uk
To: aj...@alumni.iu.edu
CC: k...@daleco.biz; a.bovane...@gmail.com; php-general@lists.php.net
Date: Tue, 13 Apr 2010 13:19:15 +0100






  
  


On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote:






> Date: Mon, 12 Apr 2010 11:09:42 -0500
> From: k...@daleco.biz
> To: aj...@alumni.iu.edu
> CC: a.bovane...@gmail.com; php-general@lists.php.net
> Subject: Re: [PHP] Mail Function Problem
> 
> Alice Wei wrote:
> >> Hi!
> >> You have the following php.ini params:SMTP = smtp.live.com
> >> 
> >> smtp_port = 587
> >> live.com not support relay and it requires authentication.
> > 
> > Is there an email account that I could try? I thought 
>  > most email accounts requires authentication anyway.
> 
> Well, "therein lies the rub," as the Bard said (maybe).
> PHP's mail() was built on a general assumption that
> there would be a local SMTP server.  It supports remote
> SMTP, but I'm not aware of any ability to do SMTP auth,
> even in the PEAR packages.
> 
> You might just wanna read up on mail in general.  The
> php.net/mail page lists several relevant RFC's, and
> has links to most of the PEAR mail classes, etc.
> 
> You should definitely read up on live.com's email
> configuration.  If they use SMTP auth, I'm not sure
> you can do this (per above).  If it uses, say, "POP
> before SMTP" for authorization, you might be able to
> hack something together with the PHP IMAP functions, or
> even sockets, but you're getting into a big lotta work
> for what seems a small thing.
> 

This is what I am talking about. 
Two years ago when I first set up my own server with Linux and not Windows, I 
never had to deal with this. 
Perhaps the authentication has since then got stricter, but it should not be so 
much of a heck of a deal. 

I found this doc from ATT's website, 
http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the 
smtp server I provided earlier is probably not up to date. 

I think I will fiddle around with the php.ini file and see what else is there. 
Thanks.

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




Linux installations come with sendmail which allows you to send email directly. 
Windows doesn't have this as part of the base setup, but I believe if you can 
install a local mail server then this should fix the issue.

Something like http://www.hmailserver.com/? I use AT&T, why is it that I use 
their SMTP server and my From address in PHP.ini file didn't work?

Thanks. 

Alice






Thanks,sh

http://www.ashleysheridan.co.uk







  
_
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 Problem

2010-04-13 Thread Ashley Sheridan
On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote:

> 
> 
> 
> 
> 
> > Date: Mon, 12 Apr 2010 11:09:42 -0500
> > From: k...@daleco.biz
> > To: aj...@alumni.iu.edu
> > CC: a.bovane...@gmail.com; php-general@lists.php.net
> > Subject: Re: [PHP] Mail Function Problem
> > 
> > Alice Wei wrote:
> > >> Hi!
> > >> You have the following php.ini params:SMTP = smtp.live.com
> > >> 
> > >> smtp_port = 587
> > >> live.com not support relay and it requires authentication.
> > > 
> > > Is there an email account that I could try? I thought 
> >  > most email accounts requires authentication anyway.
> > 
> > Well, "therein lies the rub," as the Bard said (maybe).
> > PHP's mail() was built on a general assumption that
> > there would be a local SMTP server.  It supports remote
> > SMTP, but I'm not aware of any ability to do SMTP auth,
> > even in the PEAR packages.
> > 
> > You might just wanna read up on mail in general.  The
> > php.net/mail page lists several relevant RFC's, and
> > has links to most of the PEAR mail classes, etc.
> > 
> > You should definitely read up on live.com's email
> > configuration.  If they use SMTP auth, I'm not sure
> > you can do this (per above).  If it uses, say, "POP
> > before SMTP" for authorization, you might be able to
> > hack something together with the PHP IMAP functions, or
> > even sockets, but you're getting into a big lotta work
> > for what seems a small thing.
> > 
> 
> This is what I am talking about. 
> Two years ago when I first set up my own server with Linux and not Windows, I 
> never had to deal with this. 
> Perhaps the authentication has since then got stricter, but it should not be 
> so much of a heck of a deal. 
> 
> I found this doc from ATT's website, 
> http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the 
> smtp server I provided earlier is probably not up to date. 
> 
> I think I will fiddle around with the php.ini file and see what else is 
> there. 
> Thanks.
> 
> 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


Linux installations come with sendmail which allows you to send email
directly. Windows doesn't have this as part of the base setup, but I
believe if you can install a local mail server then this should fix the
issue.

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




Re: [PHP] Mail Function Problem

2010-04-12 Thread kranthi
when you install pear package Mail a file called Mail.php will be
installed into C:/xampp/php/PEAR
>> Mail.php contains the class Mail. So getting a "class not found" error is 
>> not possible..
are you sure you are doing require_once 'Mail.php' ?

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



Re: [PHP] Mail Function Problem

2010-04-12 Thread Karl DeSaulniers

Hey Alice,
Try throwing the MIME in. Sometimes messages get thrown in an abyss  
if they don't know the MIME version or content type of an email.
They think its spam and so you wouldn't get an error message on your  
end. Just no email.


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

Karl


On Apr 12, 2010, at 10:24 PM, Alice Wei wrote:



From: kranthi...@gmail.com
Date: Tue, 13 Apr 2010 07:41:19 +0530
Subject: Re: [PHP] Mail Function Problem
To: aj...@alumni.iu.edu
CC: k...@daleco.biz; php-general@lists.php.net

thats weired...
Mail.php contains the class Mail. So getting a "class not found" error
is not possible... (require_once stops the script in case it can't
find Mail.php)
Do I need to move the Mail PEAR class to the same folder as my  
web folder

ensure that C:/xampp/php/PEAR folder is added to your include list


I thought so too, this is what I have in my php.ini:

; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
include_path = ".;C:\xampp\php\PEAR"

This is the contents of my C:\xampp\php\PEAR\Mail:
mail.php
mime.php
mimeDecode.php
mimePart.php
null.php
RFC822.php
sendmail.php
smtp.php

Unless, I have to do require_once("mail.php")?
I am getting confused.

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


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 Problem

2010-04-12 Thread Alice Wei

> From: kranthi...@gmail.com
> Date: Tue, 13 Apr 2010 07:41:19 +0530
> Subject: Re: [PHP] Mail Function Problem
> To: aj...@alumni.iu.edu
> CC: k...@daleco.biz; php-general@lists.php.net
> 
> thats weired...
> Mail.php contains the class Mail. So getting a "class not found" error
> is not possible... (require_once stops the script in case it can't
> find Mail.php)
> >> Do I need to move the Mail PEAR class to the same folder as my web folder
> ensure that C:/xampp/php/PEAR folder is added to your include list

I thought so too, this is what I have in my php.ini:

; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
include_path = ".;C:\xampp\php\PEAR"

This is the contents of my C:\xampp\php\PEAR\Mail:
mail.php
mime.php
mimeDecode.php
mimePart.php
null.php
RFC822.php
sendmail.php
smtp.php

Unless, I have to do require_once("mail.php")?
I am getting confused. 

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 Problem

2010-04-12 Thread kranthi
thats weired...
Mail.php contains the class Mail. So getting a "class not found" error
is not possible... (require_once stops the script in case it can't
find Mail.php)
>> Do I need to move the Mail PEAR class to the same folder as my web folder
ensure that C:/xampp/php/PEAR folder is added to your include list

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



RE: [PHP] Mail Function Problem

2010-04-12 Thread Alice Wei

> Date: Mon, 12 Apr 2010 15:54:05 -0500
> From: k...@daleco.biz
> To: kranthi...@gmail.com
> CC: aj...@alumni.iu.edu; php-general@lists.php.net
> Subject: Re: [PHP] Mail Function Problem
> 
> kranthi wrote:
> > PEAR's mail package does support authentication.
> > http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
> > 
> 
> I will say "mea culpa" on this one; apparently I didn't
> dig deep enough into the PEAR docs to figure this out.
> It's certainly not mentioned on the manpage at php.net,
> but, of course, the PEAR stuff is elsewhere.  I read over
> the first page linked from the PHP manpage, so it must
> have been a lil' deeper than that.  If it's only available
> at about.com (lol), I'd suggest filing a PR with the PEAR
> folk's documentation team, eh?
> 
> But, this time I'll do what I shoulda mentioned before and
> include the "IANAE" disclaimer on all things PEAR, many
> things PHP, and some things SMTP.
> 
> Kevin Kinsey

I tried installing the Pear Mail package, it is now located in php/PEAR/Mail, 
and my code is located in the htdocs. 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'];

if($_POST['submit']=="Submit") {
$from = "elite.engl...@att.net";
$to =  $email;
$subject = "Comments Regarding HH Web Design Studio";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n 
Comments:\n $comments";

$host = "smtp.att.yahoo.com";
$username = "my_user_name";
$password = "password";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$mail->send($to, $headers, $body);

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

This is what I get: 

Fatal error:  Class 'Mail' not found in C:\xampp\htdocs\Alice.Wei\web\mail.php
 on line 30

Do I need to move the Mail PEAR class to the same folder as my web folder? How 
can I make sure that my Pear is running?
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 Problem

2010-04-12 Thread Karl DeSaulniers

Hi Alice,
I have a sendmail script I wrote on my way to learning PHP.
Uses PHP 4 i believe, maybe 5. Wrote it a while ago.
You and anyone else are welcome to use it/modify.

You can reference this php it from multiple forms.
Just specify the form names it should accept and their parameters.
It can also send HTML results with a little modification.

It isn't necessarily set up for mass emailing, but with a little  
tweaking, I am sure you could get it to work.
You can separate the emails with comas "," currently and it will send  
to all of them, but if they are in the TO:,

everyone will see everyones email address.
Might set it up to send to your email in the TO: and use the BCC: to  
send to your users.

If you do convert it, mind sharing back?? :))

HTH,

http://designdrumm.com/sendmail_gen.php.zip

Karl


On Apr 12, 2010, at 5:31 PM, Alice Wei wrote:







Hi,

 Thanks to everyone's suggestions, I have followed some instructions  
from http://www.geeksengine.com/article/install-pear-on-windows.html  
and attempted to install PEAR. The problem is, when I do a test page,  
which only has:


. utor

It only gives me a blank page, with no errors. Has anyone who  
succeeded with using PEAR on PHP can guide me on a good tutorial to  
read?


Thanks for your help.

Alice

Date: Mon, 12 Apr 2010 15:54:05 -0500
From: k...@daleco.biz
To: kranthi...@gmail.com
CC: aj...@alumni.iu.edu; php-general@lists.php.net
Subject: Re: [PHP] Mail Function Problem

kranthi wrote:

PEAR's mail package does support authentication.
http://email.about.com/od/emailprogrammingtips/qt/ 
PHP_Email_SMTP_Authentication.htm




I will say "mea culpa" on this one; apparently I didn't
dig deep enough into the PEAR docs to figure this out.
It's certainly not mentioned on the manpage at php.net,
but, of course, the PEAR stuff is elsewhere.  I read over
the first page linked from the PHP manpage, so it must
nks ve been a lil' deeper than that.  If it's only available
at about.com (lol), I'd suggest filing a PR with the PEAR
folk's documentation team, eh?

But, this time I'll do what I shoulda mentioned before and
include the "IANAE" disclaimer on all things PEAR, many
things PHP, and some things SMTP.

Kevin Kinsey


_
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



RE: [PHP] Mail Function Problem

2010-04-12 Thread Alice Wei






Hi, 

 Thanks to everyone's suggestions, I have followed some instructions from 
http://www.geeksengine.com/article/install-pear-on-windows.html and attempted 
to install PEAR. The problem is, when I do a test page, which only has:

. utor

It only gives me a blank page, with no errors. Has anyone who succeeded with 
using PEAR on PHP can guide me on a good tutorial to read?

Thanks for your help.

Alice
> Date: Mon, 12 Apr 2010 15:54:05 -0500
> From: k...@daleco.biz
> To: kranthi...@gmail.com
> CC: aj...@alumni.iu.edu; php-general@lists.php.net
> Subject: Re: [PHP] Mail Function Problem
> 
> kranthi wrote:
> > PEAR's mail package does support authentication.
> > http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
> > 
> 
> I will say "mea culpa" on this one; apparently I didn't
> dig deep enough into the PEAR docs to figure this out.
> It's certainly not mentioned on the manpage at php.net,
> but, of course, the PEAR stuff is elsewhere.  I read over
> the first page linked from the PHP manpage, so it must
> nks ve been a lil' deeper than that.  If it's only available
> at about.com (lol), I'd suggest filing a PR with the PEAR
> folk's documentation team, eh?
> 
> But, this time I'll do what I shoulda mentioned before and
> include the "IANAE" disclaimer on all things PEAR, many
> things PHP, and some things SMTP.
> 
> Kevin Kinsey
  
_
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 Problem

2010-04-12 Thread Kevin Kinsey

kranthi wrote:

PEAR's mail package does support authentication.
http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm



I will say "mea culpa" on this one; apparently I didn't
dig deep enough into the PEAR docs to figure this out.
It's certainly not mentioned on the manpage at php.net,
but, of course, the PEAR stuff is elsewhere.  I read over
the first page linked from the PHP manpage, so it must
have been a lil' deeper than that.  If it's only available
at about.com (lol), I'd suggest filing a PR with the PEAR
folk's documentation team, eh?

But, this time I'll do what I shoulda mentioned before and
include the "IANAE" disclaimer on all things PEAR, many
things PHP, and some things SMTP.

Kevin Kinsey

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



Re: [PHP] Mail Function Problem

2010-04-12 Thread kranthi
PEAR's mail package does support authentication.
http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

In case you get a "Sent Successfully" message (but didn't get a mail
in your inbox or spam folder) there is a problem with your SMTP server
configuration. And
>> There's no need to edit anything in php.ini, and, since it is pure PHP,
>> it should work on Windows too (i tried it and it works)

KK.

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



RE: [PHP] Mail Function Problem

2010-04-12 Thread Teus Benschop
On Mon, 2010-04-12 at 12:58 -0400, Alice Wei wrote:
> Hi,
> 
>   I found an article on the item you described.
> http://www.talkphp.com/vbarticles.php?do=article&articleid=51&title=sending-emails-with-the-zend-framework,
>  but I am using Windows on my PHP. Would this still work? Looks like the 
> example code it provided is from a Linux system. 
> 
>   I also saw info. on this link:
> http://activecodeline.com/sending-emails-via-zend_mail-using-google-email-account.
>  Since all the authentication is done here in one go, what should I edit on 
> my PHP.ini file? Do I have to set the params as 
> http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf is described? I 
> use U-Verse from AT&T, by by way.
> 
> [mail function]
> ; For Win32 only.
> SMTP = smtp.att,yahoo.com
> smtp_port = 465
> 
> ; For Win32 only.
> sendmail_from = elite.engl...@att.net
> 

There's no need to edit anything in php.ini, and, since it is pure PHP,
it should work on Windows too, though I didn't try it. It works well on
Linux. Here's the class we used to send mail through Zend_Mail:

setFrom($config_general->getSiteMailAddress(),
$config_general->getSiteMailName());
$mail->addTo($to_mail, $to_name);
$mail->setSubject($subject);
$mail->setBodyText($body, "UTF-8");
$smtp_host =   $config_general->getMailSendHost();
$smtp_authentication = $config_general->getMailSendAuthentication
();
$smtp_user =   $config_general->getMailSendUsername();
$smtp_password =   $config_general->getMailSendPassword();
$smtp_security =   $config_general->getMailSendSecurity();
$smtp_port =   $config_general->getMailSendPort();
if ($smtp_host != "") {
  if ($smtp_authentication != "None") {
$config = array ('auth' => $smtp_authentication, 'username' =>
$smtp_user, 'password' => $smtp_password);
$mta = new Zend_Mail_Transport_Smtp($smtp_host);
  }
  if ($smtp_security != "NONE") {
$config = array_merge ($config, array ('ssl' =>
$smtp_security));
  }
  if ($smtp_port != "") {
$config = array_merge ($config, array ('port' => $smtp_port));
  }
  if (isset ($config)) {
$mta = new Zend_Mail_Transport_Smtp($smtp_host, $config);
  } else {
$mta = new Zend_Mail_Transport_Smtp($smtp_host);
  }
  $mail->send($mta);
} else {
  // If no smtp host is given, it uses the default sendmail mail
transport agent.
  $mail->send(); 
}
  }
}

?>

Hope it works,

Teus.

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



RE: [PHP] Mail Function Problem

2010-04-12 Thread Alice Wei






> Date: Mon, 12 Apr 2010 11:09:42 -0500
> From: k...@daleco.biz
> To: aj...@alumni.iu.edu
> CC: a.bovane...@gmail.com; php-general@lists.php.net
> Subject: Re: [PHP] Mail Function Problem
> 
> Alice Wei wrote:
> >> Hi!
> >> You have the following php.ini params:SMTP = smtp.live.com
> >> 
> >> smtp_port = 587
> >> live.com not support relay and it requires authentication.
> > 
> > Is there an email account that I could try? I thought 
>  > most email accounts requires authentication anyway.
> 
> Well, "therein lies the rub," as the Bard said (maybe).
> PHP's mail() was built on a general assumption that
> there would be a local SMTP server.  It supports remote
> SMTP, but I'm not aware of any ability to do SMTP auth,
> even in the PEAR packages.
> 
> You might just wanna read up on mail in general.  The
> php.net/mail page lists several relevant RFC's, and
> has links to most of the PEAR mail classes, etc.
> 
> You should definitely read up on live.com's email
> configuration.  If they use SMTP auth, I'm not sure
> you can do this (per above).  If it uses, say, "POP
> before SMTP" for authorization, you might be able to
> hack something together with the PHP IMAP functions, or
> even sockets, but you're getting into a big lotta work
> for what seems a small thing.
> 

This is what I am talking about. 
Two years ago when I first set up my own server with Linux and not Windows, I 
never had to deal with this. 
Perhaps the authentication has since then got stricter, but it should not be so 
much of a heck of a deal. 

I found this doc from ATT's website, 
http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the 
smtp server I provided earlier is probably not up to date. 

I think I will fiddle around with the php.ini file and see what else is there. 
Thanks.

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 Problem

2010-04-12 Thread Kevin Kinsey

Alice Wei wrote:

Hi!
You have the following php.ini params:SMTP = smtp.live.com

smtp_port = 587
live.com not support relay and it requires authentication.


Is there an email account that I could try? I thought 

> most email accounts requires authentication anyway.

Well, "therein lies the rub," as the Bard said (maybe).
PHP's mail() was built on a general assumption that
there would be a local SMTP server.  It supports remote
SMTP, but I'm not aware of any ability to do SMTP auth,
even in the PEAR packages.

You might just wanna read up on mail in general.  The
php.net/mail page lists several relevant RFC's, and
has links to most of the PEAR mail classes, etc.

You should definitely read up on live.com's email
configuration.  If they use SMTP auth, I'm not sure
you can do this (per above).  If it uses, say, "POP
before SMTP" for authorization, you might be able to
hack something together with the PHP IMAP functions, or
even sockets, but you're getting into a big lotta work
for what seems a small thing.

Kevin Kinsey

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



RE: [PHP] Mail Function Problem

2010-04-12 Thread Alice Wei


Date: Mon, 12 Apr 2010 15:26:46 +0400
Subject: Re: [PHP] Mail Function Problem
From: a.bovane...@gmail.com
To: aj...@alumni.iu.edu
CC: php-general@lists.php.net

Hi!
You have the following php.ini params:SMTP = smtp.live.com

smtp_port = 587
live.com not support relay and it requires authentication.

Is there an email account that I could try? I thought most email accounts 
requires authentication anyway.


Thanks for your help.

Alice

On Mon, Apr 12, 2010 at 6:33 AM, Alice Wei  wrote:



Hi,



I have an issue here where I see no PHP errors on my mail function usage, and 
yet I am not getting the mail in the desired account. Here is what I have for 
my PHP code:



$headers = "From: aj...@alumni.iu.edu";

$to = "aj...@alumni.iu.edu ";

$subject = "Comments Regarding My Studio";

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

mail($to, $subject, $body,$headers);



This is what I have in my PHP.ini:



[mail function]

; For Win32 only.

SMTP = smtp.live.com

smtp_port = 587



; For Win32 only.

sendmail_from = aj...@alumni.iu.edu



; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").

;sendmail_path =



; 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 =



Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on the 
list please give me some pointers on what I may have done wrong here?

Thanks for your help.



_

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


-- 
With regards,
Alexei Bovanenko

  
_
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 Problem

2010-04-12 Thread Alexey Bovanenko
Hi!

You have the following php.ini params:
SMTP = smtp.live.com
smtp_port = 587

live.com not support relay and it requires authentication.


On Mon, Apr 12, 2010 at 6:33 AM, Alice Wei  wrote:

>
> Hi,
>
> I have an issue here where I see no PHP errors on my mail function usage,
> and yet I am not getting the mail in the desired account. Here is what I
> have for my PHP code:
>
> $headers = "From: aj...@alumni.iu.edu";
> $to = "aj...@alumni.iu.edu ";
> $subject = "Comments Regarding My Studio";
> $body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n
> Comments:\n $comments";
> mail($to, $subject, $body,$headers);
>
> This is what I have in my PHP.ini:
>
> [mail function]
> ; For Win32 only.
> SMTP = smtp.live.com
> smtp_port = 587
>
> ; For Win32 only.
> sendmail_from = aj...@alumni.iu.edu
>
> ; For Unix only.  You may supply arguments as well (default: "sendmail -t
> -i").
> ;sendmail_path =
>
> ; 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 =
>
> Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on
> the list please give me some pointers on what I may have done wrong here?
> Thanks for your help.
>
> _
> 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




-- 
With regards,
Alexei Bovanenko


RE: [PHP] Mail Function Problem

2010-04-12 Thread Alice Wei


> From: peter.e.l...@gmail.com
> Date: Mon, 12 Apr 2010 13:09:48 +0200
> Subject: Re: [PHP] Mail Function Problem
> To: k...@daleco.biz
> CC: aj...@alumni.iu.edu; php-general@lists.php.net
> 
> On 12 April 2010 05:22, Kevin Kinsey  wrote:
> >
> > Thanks to the worldwide brotherhood of crooks known as spammers,
> > sending e-mail these days isn't nearly as easy as PHP makes it look.
> > You might wanna look into an "errors-to" header to help debug any
> > problems with sender authorization, bad ports, etc.
> >
> 
> Along these lines: there's a chance that sending a mail from yourself,
> to yourself, through PHP like this, will cause mail servers to think
> it's spam. For testing email sending, normal scenarios are better
> (i.e. send an email to another account).
> 
> 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
> 

I have changed my $to to $email, so it is not the same email address as the 
$from. I also added Kevin's lines with the parameters that April suggested, and 
it looks like I still get Sending Mail failed. Which function should I use to 
find out why my sending mail failed?

Thanks for your help.

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 Problem

2010-04-12 Thread Peter Lind
On 12 April 2010 05:22, Kevin Kinsey  wrote:
>
> Thanks to the worldwide brotherhood of crooks known as spammers,
> sending e-mail these days isn't nearly as easy as PHP makes it look.
> You might wanna look into an "errors-to" header to help debug any
> problems with sender authorization, bad ports, etc.
>

Along these lines: there's a chance that sending a mail from yourself,
to yourself, through PHP like this, will cause mail servers to think
it's spam. For testing email sending, normal scenarios are better
(i.e. send an email to another account).

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 Problem

2010-04-11 Thread Kevin Kinsey

Alice Wei wrote:
Hi, 

I have an issue here where I see no PHP errors on my mail 

> function usage, and yet I am not getting the mail in the
> desired account. Here is what I have for my PHP code:


$headers = "From: aj...@alumni.iu.edu";
$to = "aj...@alumni.iu.edu ";
$subject = "Comments Regarding My Studio";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n 
$comments";
mail($to, $subject, $body,$headers);


I don't see any way for you to know if there are any errors.

Try this as a very basic start:

$headers = "From: aj...@alumni.iu.edu";
$to = "aj...@alumni.iu.edu ";
$subject = "Comments Regarding My Studio";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n 
$comments";
$success=mail($to, $subject, $body,$headers);

if ($success) {
   echo "Mail was sent successfully!";
} else {
   echo "Sending of mail failed!";
}




This is what I have in my PHP.ini:

[mail function]
; For Win32 only.
SMTP = smtp.live.com
smtp_port = 587

; For Win32 only.
sendmail_from = aj...@alumni.iu.edu

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; 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 =

Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can

> anyone on the list please give me some pointers on what I may have done wrong 
here?

Thanks for your help.


Thanks to the worldwide brotherhood of crooks known as spammers,
sending e-mail these days isn't nearly as easy as PHP makes it look.
You might wanna look into an "errors-to" header to help debug any
problems with sender authorization, bad ports, etc.

HTH,

KDK

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



[PHP] Mail Function Problem

2010-04-11 Thread Alice Wei

Hi, 

I have an issue here where I see no PHP errors on my mail function usage, and 
yet I am not getting the mail in the desired account. Here is what I have for 
my PHP code:

$headers = "From: aj...@alumni.iu.edu";
$to = "aj...@alumni.iu.edu ";
$subject = "Comments Regarding My Studio";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n 
Comments:\n $comments";
mail($to, $subject, $body,$headers);

This is what I have in my PHP.ini:

[mail function]
; For Win32 only.
SMTP = smtp.live.com
smtp_port = 587

; For Win32 only.
sendmail_from = aj...@alumni.iu.edu

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; 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 =

Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on the 
list please give me some pointers on what I may have done wrong here?
Thanks for your help.
  
_
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] About the php mail function and imap_mail function

2010-04-04 Thread Andre Polykanine
Hello ttplayer,

If GMail does allow sending through socket, wait a bit, I'll upload a
class written on my own for sending mail through a custom SMTP via
socket.
-- 
With best regards from Ukraine,
Andre
Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule

- Original message -
From: ttplayer 
To: php-general 
Date: Sunday, April 4, 2010, 3:28:33 PM
Subject: [PHP] About the php mail function and imap_mail function

Hi, everyone!
 I have a problem about the php mail function and imap_mail function.
 When I use the mail or imap_mail function to send a email, the php script 
sends the email through the local mail sever with sendmail or another MTA 
supported. However, I have a gmail account. I just want the php script to send 
emails via my gmail account. How can I do it?
 Thank you.


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



Re: [PHP] About the php mail function and imap_mail function

2010-04-04 Thread dispy
Am 04.04.2010 14:28, schrieb ttplayer:
> Hi, everyone!
>  I have a problem about the php mail function and imap_mail function.
>  When I use the mail or imap_mail function to send a email, the php script 
> sends the email through the local mail sever with sendmail or another MTA 
> supported. However, I have a gmail account. I just want the php script to 
> send emails via my gmail account. How can I do it?
>  Thank you.
a) use an external SMTP-class, you could take a look at PEAR (which
directly etablishes a connection to your gmail-account)
b) configure your mail-server/system that he delivers the mails via an
external SMTP_Server - there are several tutorials how to do that in the
inet



Regards,

Valentin Dreismann

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



[PHP] About the php mail function and imap_mail function

2010-04-04 Thread ttplayer
Hi, everyone!
 I have a problem about the php mail function and imap_mail function.
 When I use the mail or imap_mail function to send a email, the php script 
sends the email through the local mail sever with sendmail or another MTA 
supported. However, I have a gmail account. I just want the php script to send 
emails via my gmail account. How can I do it?
 Thank you.

Re: [PHP] Mail Function In PHP

2010-03-10 Thread Michael Kubler
Having worked at a decent sized, respectable ISP with 100,000+ customers 
sending email via Iron Ports (email scanners), even they would get put 
on a blacklist on a monthly basis. Hell it wouldn't surprise me if 
Gmail's SMTP servers got put on a black list at some point.
There's seemingly hundreds of blacklists and whilst some play nice, 
others are very paranoid.
Usually the good email servers will detect your on a blacklist then rate 
limit the number of emails it'll accept from you. If you keep pissing it 
off, by sending emails to non-existant addresses (something they REALLY 
hate), sending emails that are too big, or simply sending too many 
emails or emails with too many recipients, then it'll tighten the 
restrictions. Over time if your good then those restrictions will be 
released and eventually you'll be able to send at normal rates.


--
Michael Kubler
I believe in a better world. I support the Zeitgeist Movement -- 
www.zeitgeistaustralia.org


Teus Benschop wrote:


Once a domain or ip address was black listed, it was quite a process to
get it unlisted again, and even then as soon as mail came from that
domain, it got blacklisted again. Supposedly there is some certification
process that official smtp relays need to go through so as to prove or
certify that they won't allow spam to be sent through them, and take
steps to remove offenders from using their relay. However, this is all
guessing, and in the end we just gave up and used our ISP's official
relay. Teus.


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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread james . stojan
Any volume of mail sent direct to mx records is a red flag for anti spammers 
and without an smtp spf dkim and rdns you are wasting your time. The logic is 
that only people sending spam would be sending direct to mx like that. Fair or 
not that is just how life works. Oh and most mail servers do check rdns spf 
etc. 

It is kind of pointless to send emails if they end up in the spam folder or 
worse don't get delivered at all. Do it right the first time use an smtp rdns 
and spf at the very least. 


Sent via BlackBerry from T-Mobile

-Original Message-
From: Richard Quadling 
Date: Mon, 8 Mar 2010 10:21:53 
To: Kannan
Cc: 
Subject: Re: [PHP] Mail Function In PHP
On 7 March 2010 04:54, 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..
>
>
>
>
>
>
>
>
>
>
> --
> With regards,
>
> Kannan. R. P,
> Blog @: http://kannan4k.wordpress.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Contrary to popular belief, to send an email you do not need to have
your own SMTP server. All you need to know is the SMTP server
responsible for your recipients email.

This information is held as part of the domain registration details
and is known as the MX records (as I understand it).

PHP has a function called getmxrr() [1]. This allows you to supply a
domain name and get back the list of MX records suitable for handling
the SMTP mail.

This function wasn't available on Windows until recently, and I
created a userland version utilising Windows nslookup.exe program [2].

So, once you've got the list of SMTP servers for the domain you are
sending email to, you can use the ini_set('SMTP', 'xx'); function
to set the server to handle the mail() call you are about to make.

Upside : No local SMTP server - you are not responsible for
maintaining/administering/etc. any aspect of the SMTP process.
Upside : If the mail() call fails, you can try the other MX records (I
tend to sort the results based upon weight and try them in sequence).
If it fails all of them, you know straight away and can deal with it.
Upside : No relaying. No permission issues to worry about. You are
simply talking to the public SMTP servers just like any other SMTP
server or sender.

Downside : No queuing. Without a_LOCAL_ SMTP server, you can only
deal with sending email in real time.
Downside : One domain at a time. You cannot send email to
a...@domain1.com, b...@domain2.com_and_ c...@domain3.com in the 1 email.

None of these steps affect the use of mail() or a mail sending class
(phpmailer, RMail, html_mime_mail5, etc.).

Regards,

Richard.

[1] http://docs.php.net/getmxrr
[2] http://docs.php.net/getmxrr#53182

Richard.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread John Black

On 03/08/2010 10:45 PM, John Black wrote:

You can use SPF, DomainKeys plus valid DNS information.
I have setup SPF records for my domains. If you attempt to send E-Mail
as if it was sent from my server then any server doing SPF record
checking will not accept or simply drop your message.
I have not setup DomainKeys since SPF has served me well but I will
configure it soon.


woops, forgot to add that I doubt that you'll be able to get a pure 
webserver to do this for you, reliably, since some smtp servers will 
call your server back and check if the e-mail account exists. I'd assume 
that the server will drop the mail if your script sending server is not 
even running smtp on port 25.


--
John
Niemand ist frei, der über sich selbst nicht Herr ist.
[Matthias Claudius]

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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread John Black

On 03/08/2010 06:18 PM, Richard Quadling wrote:

On 8 March 2010 13:06, Teus Benschop  wrote:

On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote:

Contrary to popular belief, to send an email you do not need to have
your own SMTP server. All you need to know is the SMTP server
responsible for your recipients email.

[...]
above. But at times it happens that the receiving smtp server refuses to
accept mail from the sender since the sender is not known to be a good
smtp server, and at times it could get blacklisted. Rules like this get
tightened up because of the desire to curb spam at the source.

Teus.

So, say I did go and setup a local SMTP relay, how would I make it
known that it was a "real" smtp server and not just some script
pushing spam?


You can use SPF, DomainKeys plus valid DNS information.
I have setup SPF records for my domains. If you attempt to send E-Mail 
as if it was sent from my server then any server doing SPF record 
checking will not accept or simply drop your message.


I have not setup DomainKeys since SPF has served me well but I will 
configure it soon.


--
John
Insanity in individuals is something rare - but in groups, parties, 
nations and epochs, it is the rule.

[Friedrich Nietzsche]

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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread Teus Benschop
On Mon, 2010-03-08 at 17:18 +, Richard Quadling wrote:
> So, say I did go and setup a local SMTP relay, how would I make it
> known that it was a "real" smtp server and not just some script
> pushing spam?
> 
> 

Once a domain or ip address was black listed, it was quite a process to
get it unlisted again, and even then as soon as mail came from that
domain, it got blacklisted again. Supposedly there is some certification
process that official smtp relays need to go through so as to prove or
certify that they won't allow spam to be sent through them, and take
steps to remove offenders from using their relay. However, this is all
guessing, and in the end we just gave up and used our ISP's official
relay. Teus.


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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread Marc Trudel
If you control your DNS server setup and such, DKIM and authentication
technologies alikes (http://en.wikipedia.org/wiki/DomainKeys) are the way to
go.

Also, make sure the reverse DNS lookup is pointing to the right place, i.e.
that the SMTP server domain name translates to an IP that translates back to
the same domain name when you do a reverse lookup.

Since this is really something more of a network arch. setup, you probably
will find more answers for that on ServerFault or the likes.

MT

On Tue, Mar 9, 2010 at 2:18 AM, Ashley Sheridan 
wrote:

> On Mon, 2010-03-08 at 17:18 +, Richard Quadling wrote:
>
> > On 8 March 2010 13:06, Teus Benschop  wrote:
> > > On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote:
> > >> Contrary to popular belief, to send an email you do not need to have
> > >> your own SMTP server. All you need to know is the SMTP server
> > >> responsible for your recipients email.
> > > [...]
> > >
> > > While the above is true, there is also another thing that comes into
> > > play. We used to send email directly to the receiver the way described
> > > above. But at times it happens that the receiving smtp server refuses
> to
> > > accept mail from the sender since the sender is not known to be a good
> > > smtp server, and at times it could get blacklisted. Rules like this get
> > > tightened up because of the desire to curb spam at the source.
> > >
> > > Teus.
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > So, say I did go and setup a local SMTP relay, how would I make it
> > known that it was a "real" smtp server and not just some script
> > pushing spam?
> >
> >
> >
> > --
> > -
> > Richard Quadling
> > "Standing on the shoulders of some very clever giants!"
> > EE : http://www.experts-exchange.com/M_248814.html
> > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
> > Zend Certified Engineer :
> http://zend.com/zce.php?c=ZEND002498&r=213474731
> > ZOPA : http://uk.zopa.com/member/RQuadling
> >
>
>
> By having your local relay talk seductively to the remote server?
>
> More sensibly though, I would assume that you could use some sort of
> certificate for this, although I don't know much about mail servers.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>


-- 
Marc Trudel-Bélisle
www.wizcorp.jp


Re: [PHP] Mail Function In PHP

2010-03-08 Thread Ashley Sheridan
On Mon, 2010-03-08 at 17:18 +, Richard Quadling wrote:

> On 8 March 2010 13:06, Teus Benschop  wrote:
> > On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote:
> >> Contrary to popular belief, to send an email you do not need to have
> >> your own SMTP server. All you need to know is the SMTP server
> >> responsible for your recipients email.
> > [...]
> >
> > While the above is true, there is also another thing that comes into
> > play. We used to send email directly to the receiver the way described
> > above. But at times it happens that the receiving smtp server refuses to
> > accept mail from the sender since the sender is not known to be a good
> > smtp server, and at times it could get blacklisted. Rules like this get
> > tightened up because of the desire to curb spam at the source.
> >
> > Teus.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> So, say I did go and setup a local SMTP relay, how would I make it
> known that it was a "real" smtp server and not just some script
> pushing spam?
> 
> 
> 
> -- 
> -
> Richard Quadling
> "Standing on the shoulders of some very clever giants!"
> EE : http://www.experts-exchange.com/M_248814.html
> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> ZOPA : http://uk.zopa.com/member/RQuadling
> 


By having your local relay talk seductively to the remote server?

More sensibly though, I would assume that you could use some sort of
certificate for this, although I don't know much about mail servers.

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




Re: [PHP] Mail Function In PHP

2010-03-08 Thread Richard Quadling
On 8 March 2010 13:06, Teus Benschop  wrote:
> On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote:
>> Contrary to popular belief, to send an email you do not need to have
>> your own SMTP server. All you need to know is the SMTP server
>> responsible for your recipients email.
> [...]
>
> While the above is true, there is also another thing that comes into
> play. We used to send email directly to the receiver the way described
> above. But at times it happens that the receiving smtp server refuses to
> accept mail from the sender since the sender is not known to be a good
> smtp server, and at times it could get blacklisted. Rules like this get
> tightened up because of the desire to curb spam at the source.
>
> Teus.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

So, say I did go and setup a local SMTP relay, how would I make it
known that it was a "real" smtp server and not just some script
pushing spam?



-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread Richard Quadling
On 8 March 2010 13:06, Teus Benschop  wrote:
>
> On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote:
> > Contrary to popular belief, to send an email you do not need to have
> > your own SMTP server. All you need to know is the SMTP server
> > responsible for your recipients email.
> [...]
>
> While the above is true, there is also another thing that comes into
> play. We used to send email directly to the receiver the way described
> above. But at times it happens that the receiving smtp server refuses to
> accept mail from the sender since the sender is not known to be a good
> smtp server, and at times it could get blacklisted. Rules like this get
> tightened up because of the desire to curb spam at the source.
>
> Teus.

Black listing can happen even for valid domains.




--
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread Teus Benschop
On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote:
> Contrary to popular belief, to send an email you do not need to have
> your own SMTP server. All you need to know is the SMTP server
> responsible for your recipients email.
[...]

While the above is true, there is also another thing that comes into
play. We used to send email directly to the receiver the way described
above. But at times it happens that the receiving smtp server refuses to
accept mail from the sender since the sender is not known to be a good
smtp server, and at times it could get blacklisted. Rules like this get
tightened up because of the desire to curb spam at the source.

Teus.



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



Re: [PHP] Mail Function In PHP

2010-03-08 Thread Richard Quadling
On 7 March 2010 04:54, 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..
>
>
>
>
>
>
>
>
>
>
> --
> With regards,
>
> Kannan. R. P,
> Blog @: http://kannan4k.wordpress.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Contrary to popular belief, to send an email you do not need to have
your own SMTP server. All you need to know is the SMTP server
responsible for your recipients email.

This information is held as part of the domain registration details
and is known as the MX records (as I understand it).

PHP has a function called getmxrr() [1]. This allows you to supply a
domain name and get back the list of MX records suitable for handling
the SMTP mail.

This function wasn't available on Windows until recently, and I
created a userland version utilising Windows nslookup.exe program [2].

So, once you've got the list of SMTP servers for the domain you are
sending email to, you can use the ini_set('SMTP', 'xx'); function
to set the server to handle the mail() call you are about to make.

Upside : No local SMTP server - you are not responsible for
maintaining/administering/etc. any aspect of the SMTP process.
Upside : If the mail() call fails, you can try the other MX records (I
tend to sort the results based upon weight and try them in sequence).
If it fails all of them, you know straight away and can deal with it.
Upside : No relaying. No permission issues to worry about. You are
simply talking to the public SMTP servers just like any other SMTP
server or sender.

Downside : No queuing. Without a _LOCAL_ SMTP server, you can only
deal with sending email in real time.
Downside : One domain at a time. You cannot send email to
a...@domain1.com, b...@domain2.com _AND_ c...@domain3.com in the 1 email.

None of these steps affect the use of mail() or a mail sending class
(phpmailer, RMail, html_mime_mail5, etc.).

Regards,

Richard.

[1] http://docs.php.net/getmxrr
[2] http://docs.php.net/getmxrr#53182

Richard.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] Mail Function In PHP

2010-03-06 Thread Kevin Kinsey

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..


Hello,

Read the manual page for the mail() function ...

http://www.php.net/mail

Mail() requires an operating SMTP server.  This can be set
in php.ini, and possibly via the ini_set() function.  These
might be worth looking into:

$config1=ini_set(sendmail_path,"/usr/sbin/sendmail -t -i");
$config2=ini_set(SMTP,"localhost");
$config3=ini_set(smtp_port,25);

If you absolutely can't run an SMTP server or use a
remote server, you'd probably have to hack something
together with sockets or streams.

My $0.02,

Kevin Kinsey

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



Re: [PHP] Mail Function In PHP

2010-03-06 Thread Devendra Jadhav
You need SMTP Server for this..
Read bellow link to know more how to configure SMTP Server in PHP

http://email.about.com/od/emailprogrammingtips/qt/Configure_PHP_to_Use_a_Remote_SMTP_Server_for_Sending_Mail.htm


On Sun, Mar 7, 2010 at 10:24 AM, 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..
>
>
>
>
>
>
>
>
>
>
> --
> With regards,
>
> Kannan. R. P,
> Blog @: http://kannan4k.wordpress.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Devendra Jadhav
देवेंद्र जाधव


[PHP] Mail Function In PHP

2010-03-06 Thread Kannan
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..










-- 
With regards,

Kannan. R. P,
Blog @: http://kannan4k.wordpress.com/

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



Re: [PHP] php mail() function and ezmlm

2010-01-13 Thread vikash . iitb
Can you send it to other email addresses?

--
Vikash Kumar
http://vika.sh

On Thu, Jan 14, 2010 at 12:16 PM, Bob Strasser wrote:

> I'm having trouble sending info from a form to the list-subscr...@domain
> Does anyone know why ezmlm doesn't recognize the mail() function?
>
>


[PHP] php mail() function and ezmlm

2010-01-13 Thread Bob Strasser
I'm having trouble sending info from a form to the list-subscr...@domain
Does anyone know why ezmlm doesn't recognize the mail() function?



Re: [PHP] php mail() function

2009-11-25 Thread James Prentice
It looks like using XAMPP wasn't strictly necessary. I tried running
this example again using my previous versions of mysql and apache and
it worked fine. So the key is to configure Sendmail as described at
the URL I gave.

On Wed, Nov 25, 2009 at 10:58 AM, James Prentice  wrote:
> After a long delay, I've finally got mail working. I had decided to
> move on in the book that I'm working through (Head First PHP & MySQL)
> but doubled back to address the mail issue again. This is how I
> finally got it to work:
>
> 1. Switched to XAMPP for linux rather than using my existing versions
> of mysql, php and apache.
>
> 2. Uninstalled Postfix and reinstalled Sendmail. Then I followed the
> instructions here:
>
> http://dbaron.org/linux/sendmail
>
> I can't vouch that the method described at that link is completely
> safe and secure, but it worked for me and was very easy. I've spent
> many hours and days trying to get this to work so am very relieved.
>
> My only complaint is that there is quite a long delay after submitting
> report.html (from Ch. 1) while it says 'waiting for localhost...'. It
> can take up to 20 seconds or so before sending and giving
> confirmation.
>
> Thanks for all your help.
>
> On Mon, Oct 26, 2009 at 4:37 AM, Bob McConnell  wrote:
>> From: James Prentice
>>
>>> I have tried setting both $to and $email to be the same shaw address
>>> since I assumed it should be recognized by the mail server, but it's
>>> still getting bounced. So why is 'www-d...@homemade' being listed as
>>> the sender? Any ideas?
>>
>> I strongly recommend you call the help desk at Shaw and ask them to
>> explain what is happening. They should know what is going on with their
>> servers. Everyone on this list appears to be guessing at the problem,
>> which is not likely to help you.
>>
>> Bob McConnell
>>
>

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



Re: [PHP] php mail() function

2009-11-25 Thread James Prentice
After a long delay, I've finally got mail working. I had decided to
move on in the book that I'm working through (Head First PHP & MySQL)
but doubled back to address the mail issue again. This is how I
finally got it to work:

1. Switched to XAMPP for linux rather than using my existing versions
of mysql, php and apache.

2. Uninstalled Postfix and reinstalled Sendmail. Then I followed the
instructions here:

http://dbaron.org/linux/sendmail

I can't vouch that the method described at that link is completely
safe and secure, but it worked for me and was very easy. I've spent
many hours and days trying to get this to work so am very relieved.

My only complaint is that there is quite a long delay after submitting
report.html (from Ch. 1) while it says 'waiting for localhost...'. It
can take up to 20 seconds or so before sending and giving
confirmation.

Thanks for all your help.

On Mon, Oct 26, 2009 at 4:37 AM, Bob McConnell  wrote:
> From: James Prentice
>
>> I have tried setting both $to and $email to be the same shaw address
>> since I assumed it should be recognized by the mail server, but it's
>> still getting bounced. So why is 'www-d...@homemade' being listed as
>> the sender? Any ideas?
>
> I strongly recommend you call the help desk at Shaw and ask them to
> explain what is happening. They should know what is going on with their
> servers. Everyone on this list appears to be guessing at the problem,
> which is not likely to help you.
>
> Bob McConnell
>

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



Re: [PHP] mail mimedecode with multiple mails in one mbox file

2009-11-16 Thread Per Jessen
Ashley Sheridan wrote:

> On Sun, 2009-11-15 at 20:54 +0100, Per Jessen wrote:
> 
>> Ashley Sheridan wrote:
>> 
>> > Hi all,
>> > 
>> > I'm having a bit of difficulty seeing my way through this. I think
>> > I'm on the right path with mimeDecode, but I can't get it to read
>> > all of the emails in an mbox file which contains 100 emails; it
>> > only reads the first.
>> > 
>> > I've looked over the docs on pear.php.net, but can't seem to find
>> > any way to get the other 99 emails out!
>> > 
>> > Does anyone know of any way to do this,
>> 
>> Look up "formail -s"
>> 
>> 
>> /Per
>> 
>> --
>> Per Jessen, Zürich (9.0°C)
>> 
>> 
> 
> 
> Thanks, that's got me going in the right direction! There just seems
> to be no end to what you can do on a Linux console does there?!

Suggestions to the contrary would be heresy. :-[

formail has helped me a number of times when dealing with a mailbox
file, I'm pretty certain it'll do what you want.


/Per


-- 
Per Jessen, Zürich (10.1°C)


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



  1   2   3   4   5   6   7   8   9   10   >