Send Email

M

Marcos

Hello,

I work with PHP and I always have many emails to send for the users.
Currently I use the function mail of php to send this emails, but
this is not good because the php script have one short timeout, then
I'd like create one perl script called by my PHP script. I need know how
the perl work with emails, and how as I can work with it to send emails.

Since already been thankful.
 
M

Marcos

What makes you think a Perl script will have a longer timeout than a
PHP script?

The scripts PHP in its majority are defined with one max_execution_time of
30 seconds in php.ini, I think that perl script can be running for the
time that I need in the server why it does not have this limitation.

My idea is certain?

Thanks.
 
M

Marcos

I don't know PHP, but I suspect that figuring out how to change the its
timeout would be easier than learning a whole new language.

No. Only the administrator of server can change the file php.ini :( .. and
I would like to learn Perl for use in my projects.
Also, if php
calls Perl synchronously and then times out, it may take Perl down with
it.

I think that No. I found this solution in php.net, that it allows to
execute one script Perl without ties it php to it...:

http://br.php.net/exec

#!/usr/bin/perl
fork and exit 1;
Why does it take >30 seconds to send an email?

They are several e-mails, of my database :( For few emails I use the
htmlmimemail (php).

--

Thanks,

Marcos José Setim
________________________________________
Usando o M2 do Opera: http://www.opera.com/m2/
 
J

Jürgen Exner

Marcos wrote:
[...]
I need know
how the perl work with emails, and how as I can work with it to send
emails.

Did you check the Perl FAQ already ("perldoc -q mail")?

jue
 
A

Anno Siegel

Marcos said:
Hello,

I work with PHP and I always have many emails to send for the users.
Currently I use the function mail of php to send this emails, but
this is not good because the php script have one short timeout, then
I'd like create one perl script called by my PHP script. I need know how
the perl work with emails, and how as I can work with it to send emails.

What makes you think a Perl script will have a longer timeout than a
PHP script?

As to sending mail, start with "perldoc -q 'send mail'" for first
suggestions. You may want to look at other modules on CPAN later.

Anno
 
T

Tad McClellan

I need know how
the perl work with emails


You are expected to check the Perl FAQ *before* posting
to the Perl newsgroup.

perldoc -q mail

How do I parse a mail header?
How do I check a valid mail address?
How do I return the user's mail address?
How do I send mail?
How do I use MIME to make an attachment to a mail message?
How do I read mail?
 
C

Christopher Nehren

The scripts PHP in its majority are defined with one max_execution_time of
30 seconds in php.ini, I think that perl script can be running for the
time that I need in the server why it does not have this limitation.

<OT>
A server or a browser can timeout a request for a Perl program just as
easily as PHP can apply its own timeout.
</OT>

Best Regards,
Christopher Nehren
 
X

xhoster

Marcos said:
The scripts PHP in its majority are defined with one max_execution_time
of 30 seconds in php.ini, I think that perl script can be running for the
time that I need in the server why it does not have this limitation.

My idea is certain?

I don't know PHP, but I suspect that figuring out how to change the its
timeout would be easier than learning a whole new language. Also, if php
calls Perl synchronously and then times out, it may take Perl down with it.

Why does it take >30 seconds to send an email?

Xho
 
M

Marcos

Sending mail from a Perl script is very well covered in the Perl FAQ.

I'm reading the FAQ recommended here. Very Thanks.
 
S

Sherm Pendley

How is the FAQ going to help if the FAQ tells you to use a Mail package
that isn't available in PHP?

Learn to read. He's calling a Perl script from PHP. He wants to send mail
from the Perl script. Sending mail from a Perl script is very well covered
in the Perl FAQ.

Do you have anything *useful* to say?

sherm--
 
G

gimme_this_gimme_that

How is the FAQ going to help if the FAQ tells you to use a Mail package
that isn't available in PHP?
What you need is something that writes POP3 or IMAP instructions to a
mail server that can be translated
from Perl to PHP.

The check the FAQ Perl police are always good for a laugh.
 
G

gimme_this_gimme_that

Why do you think?

So if I send him a simple standalone Perl script that sends emails
I need to know what version to send.
 
B

Brian Wakem

Why do you think?

So if I send him a simple standalone Perl script that sends emails
I need to know what version to send.


Your newsreader appears to be broken. Please, either use one that isn't, or
fix the one you are using.
 
G

Gunnar Hjalmarsson

What you need is something that writes POP3 or IMAP instructions to a
mail server

The check the FAQ Perl police are always good for a laugh.

Unlike Jürgen's reply, which was adequate and helpful, your comment was
pretty amusing (and useless). Advising somebody who wants to send mail
to write POP3 or IMAP instructions wasn't aimed at helping, right?
 
J

Jürgen Exner

How is the FAQ going to help if the FAQ tells you to use a Mail
package that isn't available in PHP?
What you need is something that writes POP3 or IMAP instructions to a
mail server that can be translated
from Perl to PHP.

The check the FAQ Perl police are always good for a laugh.

If you would not have snipped the original question, you might have had a
chance to notice that the OP asked
<quote>
I need know how
the perl work with emails, and how as I can work with it to send emails.
</quote>
Now, I don't know about you, but at least to me this is a very clear request
for a solution in Perl, not in PHP.

You are confirming more and more my initial suspicion, that your main goal
is to troll this NG.

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,174
Messages
2,570,941
Members
47,476
Latest member
blackwatermelon

Latest Threads

Top