473,765 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3917
"bonfils" <ki*@bonfils.yo ur.underwear.co m> wrote in message
news:3f******** *************** @dread16.news.t ele.dk...
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
"CountScubu la" <me@scantek.hot mail.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.t ele.dk...
"CountScubu la" <me@scantek.hot mail.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.yo ur.underwear.co m> 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.ne t | 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.yo ur.underwear.co m> wrote in message
news:3f******** *************** @dread16.news.t ele.dk...
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
"CountScubu la" <me@scantek.hot mail.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.yo ur.underwear.co m> wrote in message
news:40******** *************** @dread16.news.t ele.dk...
"CountScubu la" <me@scantek.hot mail.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

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

Similar topics

9
2862
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
4206
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 system should write the sender's email address, time received, and message body to sql server, return a new trouble ticket, etc. anybody know how to set this kind of thing up? tks
6
2532
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, I'm having trouble writing to the server's event log. Here's some details: Server and workstation both in the same workgroup Logged into server as local Administrator Logged into workstation as a local user that is only in the Users group on
2
17488
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 the bare minimum: System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("<my mail server IP>", 25); smtp.Send("<one of my email addresses>", "<another of my email addresses>", "Hello", "World");
2
7502
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 existing connection was forcibly closed by the remote host." This is what I have in my config: <system.net> <mailSettings>
1
3279
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 error below, If I disable SSL and use port 587 all goes well. I have been Googling for 2 days without success and this seems to be a common problem.
7
9833
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 achieve this. Thanks
7
2636
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 fine when I use thunderbird to send mail to it and used to work fine under windows however... It doesn't work under Ubuntu. Looking at my php.ini file I see...
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.