473,394 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Mail trouble

I believe this question has been asked before, but I haven't found the
solution to it.

I've given up on the php mail() function (doesn't work fast enough for
sending large amounts of HTML mails).

Instead, I'd like to throw all my mails into the mail queue. I'm running
sendmail on freeBSD and imagine that I should be able to use the exec()
command.

Anyone has an idea?

Thanks in advance.

--
bonfils
http://kim.bonfils.com
Jul 17 '05 #1
12 3893
"bonfils" <ki*@bonfils.your.underwear.com> wrote in message
news:3f***********************@dread16.news.tele.d k...
I believe this question has been asked before, but I haven't found the
solution to it.

I've given up on the php mail() function (doesn't work fast enough for
sending large amounts of HTML mails).

Instead, I'd like to throw all my mails into the mail queue. I'm running
sendmail on freeBSD and imagine that I should be able to use the exec()
command.

Anyone has an idea?

Thanks in advance.

--
bonfils
http://kim.bonfils.com


I have serveral idea, each differnt depeing on your needs, how many emails
are you trying to send?
--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #2
"CountScubula" <me@scantek.hotmail.com> wrote:
I have serveral idea, each differnt depeing on your needs, how many emails
are you trying to send?


Currently just over a thousand - but of course it would be nice if I didn't
have to worry about the amount.
The script runs fine using the mail() function on plain text emails - it's
HTML emails (around 20 KB) that makes the mail server malfunction.

--
bonfils.
http://kim.bonfils.com
Jul 17 '05 #3
One of the things I do is to add a user to the mail server and in the
/home/username/ directory, create a file called .forward and put all the
email addresses in there. Then simple send an email to the user you just
added, the server will forward it to everyone on that list.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"bonfils" <ki*@bonfils.my.underwear.com> wrote in message
news:3f***********************@dread15.news.tele.d k...
"CountScubula" <me@scantek.hotmail.com> wrote:
I have serveral idea, each differnt depeing on your needs, how many emails are you trying to send?
Currently just over a thousand - but of course it would be nice if I

didn't have to worry about the amount.
The script runs fine using the mail() function on plain text emails - it's
HTML emails (around 20 KB) that makes the mail server malfunction.

--
bonfils.
http://kim.bonfils.com

Jul 17 '05 #4
Hello,

On 01/09/2004 12:28 PM, bonfils wrote:
I believe this question has been asked before, but I haven't found the
solution to it.

I've given up on the php mail() function (doesn't work fast enough for
sending large amounts of HTML mails).

Instead, I'd like to throw all my mails into the mail queue. I'm running
sendmail on freeBSD and imagine that I should be able to use the exec()
command.

Anyone has an idea?


If you are under Unix/Linux, your problem is most likely that you are
configuring your MTA to try to send messages immediately as opposed to
queue the message for later delivery.

In that case, if you are using sendmail in your server, it would be
better to switch for instance to qmail, but if you can't there are
options to instruct sendmail to defer deliveries until once your queue
is run to process your pending deliveries. This results in much faster
queueing.

You may want to take a look at this class for composing and sending
messages that comes with a sub-class specialized in delivering with
sendmail and has options to tell sendmail to defer your message deliveries.

http://www.phpclasses.org/mimemessage
--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Jul 17 '05 #5
"bonfils" <ki*@bonfils.your.underwear.com> wrote:
I believe this question has been asked before, but I haven't found the
solution to it.

I've given up on the php mail() function (doesn't work fast enough for
sending large amounts of HTML mails).

Instead, I'd like to throw all my mails into the mail queue. I'm running
sendmail on freeBSD and imagine that I should be able to use the exec()
command.

Anyone has an idea?


First of all: Thanks for your input. You've been very helpful.
However, I haven't had any luck yet.
My latest thought is this: Could this be achieved using the mail() function
and just changing the sendmail_path line in my php.ini file so that it sends
all mails to the queue?
However:

sendmail_path = /usr/sbin/sendmail -odq

doesn't work. The path is correct (it's FreeBSD), but the line above just
makes the mails disappear (not to the queue...)

Any ideas?

--
bonfils
http://kim.bonfils.com
Jul 17 '05 #6
On Mon, 12 Jan 2004 16:11:42 +0100, bonfils wrote:
Instead, I'd like to throw all my mails into the mail queue. I'm running
sendmail on freeBSD and imagine that I should be able to use the exec()
command.

Anyone has an idea?


First of all: Thanks for your input. You've been very helpful. However, I
haven't had any luck yet.
My latest thought is this: Could this be achieved using the mail()
function and just changing the sendmail_path line in my php.ini file so
that it sends all mails to the queue?
However:

sendmail_path = /usr/sbin/sendmail -odq

doesn't work. The path is correct (it's FreeBSD), but the line above just
makes the mails disappear (not to the queue...)

Any ideas?

While I don't particularly like the sound if this "it doesn't send batches
of HTML mail fast enough" (do I smell pork?).. mail() uses sendmail and
also uses the params you define in php.ini so changing that has no actual
input in the way you're after. If you want to use sendmail direct then you
need to feed sendmail itself. As you're on FBSD, try:
$ perldoc -q "How do I send mail?"
Yes it's Perl.. but it's the same method you'd use in PHP to
send mail to sendmail directly.

I'll leave the porting from Perl to PHP as an educational exercise.

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.

Jul 17 '05 #7
ok, here is another wacky solution.

write a small script that reads a text file of emails, and uses mail to send
them

the from your main script do this:

`php -q mailscript.php addys.txt &`;

this will cause the mailscript.php to run in the background.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"bonfils" <ki*@bonfils.your.underwear.com> wrote in message
news:3f***********************@dread16.news.tele.d k...
I believe this question has been asked before, but I haven't found the
solution to it.

I've given up on the php mail() function (doesn't work fast enough for
sending large amounts of HTML mails).

Instead, I'd like to throw all my mails into the mail queue. I'm running
sendmail on freeBSD and imagine that I should be able to use the exec()
command.

Anyone has an idea?

Thanks in advance.

--
bonfils
http://kim.bonfils.com

Jul 17 '05 #8
"CountScubula" <me@scantek.hotmail.com> wrote:
ok, here is another wacky solution.

write a small script that reads a text file of emails, and uses mail to send them

the from your main script do this:

`php -q mailscript.php addys.txt &`;

this will cause the mailscript.php to run in the background.


Looks cool. I'll just have to study a bit to find out what the command does.
(Especially the "&")
Problem is, I still have to generate every single email one at a time as it
includes a personal greeting and unsubscribe information. But having the
script run in the background makes sense.

--
bonfils
http://kim.bonfils.com
Jul 17 '05 #9
"bonfils" <ki*@bonfils.your.underwear.com> wrote in message
news:40***********************@dread16.news.tele.d k...
"CountScubula" <me@scantek.hotmail.com> wrote:
ok, here is another wacky solution.

write a small script that reads a text file of emails, and uses mail to send
them

the from your main script do this:

`php -q mailscript.php addys.txt &`;

this will cause the mailscript.php to run in the background.


Looks cool. I'll just have to study a bit to find out what the command

does. (Especially the "&")
Problem is, I still have to generate every single email one at a time as it includes a personal greeting and unsubscribe information. But having the
script run in the background makes sense.

--
bonfils
http://kim.bonfils.com


the `` backticks : runs a shell command

php -q : just runs a script with no headers sent out

& : tells the shell to run this command in background

so,

`php -q scriptname.php addyfile.txt &`;

runs a shell command, php to run scriptname.php and pass the parameter
addyfile.txt, oh, and do this in the background.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #10
"CountScubula" <me@scantek.hotmail.com> wrote:
the `` backticks : runs a shell command

php -q : just runs a script with no headers sent out

& : tells the shell to run this command in background

so,

`php -q scriptname.php addyfile.txt &`;

runs a shell command, php to run scriptname.php and pass the parameter
addyfile.txt, oh, and do this in the background.


Thanks.

;-)

--
bonfils
http://kim.bonfils.com
Jul 17 '05 #11
I noticed that Message-ID:
<Mu****************@newssvr29.news.prodigy.com> from CountScubula
contained the following:
One of the things I do is to add a user to the mail server and in the
/home/username/ directory, create a file called .forward and put all the
email addresses in there. Then simple send an email to the user you just
added, the server will forward it to everyone on that list.


Not much use if you want to customise the mail though.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #12
"Geoff Berrow" <bl******@ckdog.co.uk> wrote in message
news:1c********************************@4ax.com...
I noticed that Message-ID:
<Mu****************@newssvr29.news.prodigy.com> from CountScubula
contained the following:
One of the things I do is to add a user to the mail server and in the
/home/username/ directory, create a file called .forward and put all the
email addresses in there. Then simple send an email to the user you just
added, the server will forward it to everyone on that list.


Not much use if you want to customise the mail though.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/


This is tru, thats why its simple solution, not a complex, customize to your
needs type of solution

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: joealey2003 | last post by:
Hi all... A simple mail example like... <? mail("acco...@yahoo.com","Subject of Message","Message"); ?> does not work to yahoo or spymac.com, but the same works to gmail and other servers.
10
by: Nancy Drew | last post by:
hi all i want to build a trouble ticket system. i'd like to have a component written in vbscript watch a specific mail folder for income email (something like 'troubletickets@acme.com') the...
6
by: rekaeps | last post by:
We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles sending e-mail from the server when accessing the web site from a separate client computer. Also, in the same scenario,...
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
2
by: daokfella | last post by:
I'm having trouble using localhost to test the e-mail functions in my application. I keep getting the following error when sending mail: "Unable to read data from the transport connection: An...
1
by: WIzmanG | last post by:
Hi all I am having trouble with sending email via a C#2.0 application, I use the same settings as I use in Outlook but I cannot get email to send. I am trying to use SSL on port 465 and get the...
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
7
by: r0g | last post by:
I'd like PHP to send mail to a local mailserver running at localhost:25 like I used to on windows. This mailserver is a dummy server which just writes the mail to disk for unit testing and works...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.