473,395 Members | 1,452 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,395 software developers and data experts.

mail() on linux to use other smtp server

hi all

i have written a php site that uses the mail() on windows and i had to
state in the php.ini file which smtp server to use.

have now migrated this site to a redhat 9 server, but i still want the
emails to be sent via the smtp server i stated earlier.

this may infact be a sendmail question, im not sure, (perhaps changing
sendmail_path in php.ini) but has anyone managed to send email via
mail() in php, on a linux box, that uses an external smtp server?

cheers
evan
Jul 17 '05 #1
1 9862
Hello,

on 02/09/2005 11:03 PM ehendrikd said the following:
hi all

i have written a php site that uses the mail() on windows and i had to
state in the php.ini file which smtp server to use.

have now migrated this site to a redhat 9 server, but i still want the
emails to be sent via the smtp server i stated earlier.
Why? You do not need necessarily to relay the messages in a SMTP server.
Sendmail can send the message for you directly to the recipient SMTP server.

this may infact be a sendmail question, im not sure, (perhaps changing
sendmail_path in php.ini) but has anyone managed to send email via
mail() in php, on a linux box, that uses an external smtp server?


No, I suppose you can configure sendmail to relay its messages to an
intermediate SMTP server if you really have to but that is not something
that you can configure from the sendmail command line arguments in php.ini .

If you really have to relay the messages to a SMTP server, you may want
to try this class that comes with a wrapper function named smtp_mail()
that works exactly like the mail function but lets you configure a SMTP
server to relay your messages.

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos

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

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #2

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

Similar topics

7
by: Adams-Blake Co. | last post by:
This may be OT a bit, so maybe someone can point me in the right direction. I want to test a script that sends out an e-mail. I want to test it locally on my Mandrake Linux 8.2 box. It runs OK...
3
by: martin | last post by:
Just the simplest invocation with hard coded parameters, followed by echoing a message, hangs for exactly 1 minute. ("defaulttimeout" in php.ini is set to 30 (seconds)). If I don't wait, and...
11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
2
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
4
by: manatlan | last post by:
In an intranet/lan, i'd like to put a "python server script" (which run forever) on a computer A... On another computer B, I'd like to send smtp-email to the computer A ... (send to...
26
by: Massimo Zaccarin | last post by:
ok, I know that I have to use the System.Web.Mail.SmtpMail class, but I've read from...
8
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked to was a Linux SMTP server and it worked great ...
17
by: William Gill | last post by:
My development machine (WinXP, Apache 2.2.4) does not have an smtp server, and I don't really want to install one if I can help it. Does anyone know of a simple method of testing php scripts that...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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,...
0
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...

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.