470,833 Members | 1,329 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

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

aa
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?
Jul 17 '05 #1
8 1722
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. |
Jul 17 '05 #2
aa
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" <he****@hotpop.com> wrote in message
news:sl*******************@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. |
Jul 17 '05 #3

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" <he****@hotpop.com> wrote in message
news:sl*******************@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. |
Jul 17 '05 #4
aa
On my local w2k/IIS5 the line
mail("ad*****@yahoo.com", "My Subject", "Line 1\nLine 2\nLine 3")
returns
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
ad*****@yahoo.com

What might be the reason?
Jul 17 '05 #5
[Please do not start a new thread with a response to a unrelated message]

aa wrote:
On my local w2k/IIS5 the line
mail("ad*****@yahoo.com", "My Subject", "Line 1\nLine 2\nLine 3")
returns
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
ad*****@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('ad*****@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. |
Jul 17 '05 #6
aa
> mail('a******@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?

Jul 17 '05 #7
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...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. |
Jul 17 '05 #8
aa
> 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.
Jul 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Nomen Nescio | last post: by
2 posts views Thread by Rootshell | last post: by
6 posts views Thread by Dave Kuhlman | last post: by
2 posts views Thread by cda_Alford | last post: by
9 posts views Thread by pbd22 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.