Connecting Tech Pros Worldwide Forums | Help | Site Map

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

aa
Guest
 
Posts: n/a
#1: Jul 17 '05
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?



Pedro Graca
Guest
 
Posts: n/a
#2: Jul 17 '05

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


aa wrote:[color=blue]
> 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?[/color]

Yes.

But emails aren't posted.
[color=blue]
> If affirmative which functions should I consider?[/color]

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. |
aa
Guest
 
Posts: n/a
#3: Jul 17 '05

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


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...[color=blue]
> aa wrote:[color=green]
> > If I have a customers database and wanted to automastically create and[/color][/color]
post[color=blue][color=green]
> > an email from a local computer to each customer of the same content -[/color][/color]
can I[color=blue][color=green]
> > do it in PHP?[/color]
>
> Yes.
>
> But emails aren't posted.
>[color=green]
> > If affirmative which functions should I consider?[/color]
>
> 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:[/color]
simply |[color=blue]
> http://www.catb.org/~esr/faqs/smart-questions.html | "reply" to this[/color]
post, |[color=blue]
> http://www.netmeister.org/news/learn2quote2.html | *NO* MIME, plain[/color]
text |[color=blue]
> http://www.expita.com/nomime.html | and *NO*[/color]
attachments. |


Pedro Graca
Guest
 
Posts: n/a
#4: Jul 17 '05

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



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]:[color=blue]
> "Pedro Graca" <hexkid@hotpop.com> wrote in message
> news:slrncntaj0.8p2.hexkid@ID-203069.user.uni-berlin.de...[color=green]
>> aa wrote:[color=darkred]
>> > 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?[/color]
>>
>> Yes.
>>
>> But emails aren't posted.[/color][/color]
[color=blue]
> 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?[/color]

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

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

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. |
aa
Guest
 
Posts: n/a
#5: Jul 17 '05

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


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?


Pedro Graca
Guest
 
Posts: n/a
#6: Jul 17 '05

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


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

aa wrote:[color=blue]
> 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?[/color]

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. |
aa
Guest
 
Posts: n/a
#7: Jul 17 '05

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


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


Same result
[color=blue]
> or ask your system administrator to do that for> you).[/color]

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

[color=blue]
> Your mail server configurations does not allow relaying to yahoo.com.
> Check your documentation for the mail server and reconfigure it[/color]

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?





Pedro Graca
Guest
 
Posts: n/a
#8: Jul 17 '05

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


aa wrote:[color=blue]
> 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?[/color]

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...h6pg%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. |
aa
Guest
 
Posts: n/a
#9: Jul 17 '05

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


> My guess is that your SMTP server (at the ISP) only works after POP[color=blue]
> authentication.[/color]

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.


Closed Thread