automastically create and post an email to each customer of the same content

  • Follow


If I have a customers database and wanted to automastically create and post
an email from a local computer to each customer of the same content -  can I
do it in PHP?
If affirmative which functions should I consider?


0
Reply aa8030 (70) 10/26/2004 6:51:55 PM

aa wrote:
> If I have a customers database and wanted to automastically create and post
> an email from a local computer to each customer of the same content -  can I
> do it in PHP?

Yes.

But emails aren't posted.

> If affirmative which functions should I consider?

mail()        ==> http://www.php.net/manual/en/function.mail.php

PHP functions     http://www.php.net/mysql
    for       ==> http://www.php.net/mssql
your database     http://www.php.net/pgsql ...
-- 
USENET would be a better place if everybody read:    | to  mail  me:  simply |
http://www.catb.org/~esr/faqs/smart-questions.html   | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html     | *NO* MIME, plain text |
http://www.expita.com/nomime.html                    | and *NO* attachments. |
0
Reply hexkid2 (1017) 10/26/2004 7:49:57 PM


Thanks, Pedro, that's what I needed.
One thing:
You say "emails aren't posted"
The mail() description says "mail() automatically mails the message..."

So mail() posts the messages but does not send them - what is the difference
between sending and posting?



"Pedro Graca" <hexkid@hotpop.com> wrote in message
news:slrncntaj0.8p2.hexkid@ID-203069.user.uni-berlin.de...
> aa wrote:
> > If I have a customers database and wanted to automastically create and
post
> > an email from a local computer to each customer of the same content -
can I
> > do it in PHP?
>
> Yes.
>
> But emails aren't posted.
>
> > If affirmative which functions should I consider?
>
> mail()        ==> http://www.php.net/manual/en/function.mail.php
>
> PHP functions     http://www.php.net/mysql
>     for       ==> http://www.php.net/mssql
> your database     http://www.php.net/pgsql ...
> -- 
> USENET would be a better place if everybody read:    | to  mail  me:
simply |
> http://www.catb.org/~esr/faqs/smart-questions.html   | "reply" to this
post, |
> http://www.netmeister.org/news/learn2quote2.html     | *NO* MIME, plain
text |
> http://www.expita.com/nomime.html                    | and *NO*
attachments. |


0
Reply aa8030 (70) 10/27/2004 9:06:08 AM

Please don't top-post;
see http://ursine.dyndns.org/wiki/index.php/Top_Posting
and the "Netiquette Guidelines" RFC
http://www.ietf.org/rfc/rfc1855.txt

aa top-posted [corrected]:
> "Pedro Graca" <hexkid@hotpop.com> wrote in message
> news:slrncntaj0.8p2.hexkid@ID-203069.user.uni-berlin.de...
>> aa wrote:
>> > If I have a customers database and wanted to automastically create and
>> > post an email from a local computer to each customer of the same
>> > content - can I do it in PHP?
>>
>> Yes.
>>
>> But emails aren't posted.

> You say "emails aren't posted"
> The mail() description says "mail() automatically mails the message..."
>
> So mail() posts the messages but does not send them - what is the difference
> between sending and posting?

I just don't like the word "post" when associated with mails.
Mails get sent (or queued); blog entries get posted; usenet posts get
posted


>> > If affirmative which functions should I consider?
>>
>> mail()        ==> http://www.php.net/manual/en/function.mail.php
>
> Thanks, Pedro, that's what I needed.

You're welcome.
-- 
USENET would be a better place if everybody read:    | to  mail  me:  simply |
http://www.catb.org/~esr/faqs/smart-questions.html   | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html     | *NO* MIME, plain text |
http://www.expita.com/nomime.html                    | and *NO* attachments. |
0
Reply hexkid2 (1017) 10/27/2004 10:17:03 AM

On my local w2k/IIS5 the line
mail("address@yahoo.com", "My Subject", "Line 1\nLine 2\nLine 3")
returns
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
address@yahoo.com

What might be the reason?


0
Reply aa8030 (70) 10/28/2004 10:57:13 AM

[Please do not start a new thread with a response to a unrelated message]

aa wrote:
> On my local w2k/IIS5 the line
> mail("address@yahoo.com", "My Subject", "Line 1\nLine 2\nLine 3")
> returns
> Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
> address@yahoo.com
>
> What might be the reason?

This is not a PHP issue.

Your mail server configurations does not allow relaying to yahoo.com.
Check your documentation for the mail server and reconfigure it
according to your needs (or ask your system administrator to do that for
you).


Maybe you can sidetrack your mail server by specifying the sender in the
mail() command:

    mail('address@yahoo.com', 'test', "line 1\nline 2", 'From: me@here');
-- 
USENET would be a better place if everybody read:    | to  mail  me:  simply |
http://www.catb.org/~esr/faqs/smart-questions.html   | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html     | *NO* MIME, plain text |
http://www.expita.com/nomime.html                    | and *NO* attachments. |
0
Reply hexkid2 (1017) 10/28/2004 1:17:03 PM

>     mail('address@yahoo.com', 'test', "line 1\nline 2", 'From: me@here');


Same result

> or ask your system administrator to do that for> you).

No sys admin here, just two computers connected to Internet via router-modem


> Your mail server configurations does not allow relaying to yahoo.com.
> Check your documentation for the mail server and reconfigure it

The fact that I have OE and Outlook properly functioning on this computer
and they both can e-mail to any address - does this mean that SMTP is
configured correctly?

However both OE and Outlook use pw which is stored in the account
configuration. Perhaps to e-mail from PHP I need to pass the login and pw to
SMTP - if so, how do I do that?





0
Reply aa8030 (70) 10/28/2004 2:22:28 PM

aa wrote:
> However both OE and Outlook use pw which is stored in the account
> configuration. Perhaps to e-mail from PHP I need to pass the login and pw to
> SMTP - if so, how do I do that?

You have to set php up to mimic the behaviour of OE and Outlook.

My guess is that your SMTP server (at the ISP) only works after POP
authentication.

I did a POP authenticate function a long time ago ...
It's available on Google groups
    http://groups.google.com/groups?selm=ieuumvgbd9ppvejcjiav3lmjeij4r3h6pg%404ax.com

-- 
USENET would be a better place if everybody read:    | to  mail  me:  simply |
http://www.catb.org/~esr/faqs/smart-questions.html   | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html     | *NO* MIME, plain text |
http://www.expita.com/nomime.html                    | and *NO* attachments. |
0
Reply hexkid2 (1017) 10/28/2004 4:55:53 PM

> My guess is that your SMTP server (at the ISP) only works after POP
> authentication.

Not exactly. As I said, I am getting that error on my local machine. And I
do not intend this for a website. I just want to automate sending out
relatively big number of e-mails from my local w2k. IE and Outlook do not
seem to allow the functionality I need.


0
Reply aa8030 (70) 10/28/2004 6:39:44 PM

8 Replies
20 Views

(page loaded in 2.21 seconds)

Similiar Articles:












7/15/2012 11:21:36 PM


Reply: