LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 02-11-2010, 04:18 PM   #1
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Rep: Reputation: 18
Use SMTP Value in mail() Function


Hi,


I have specified a particular IP in the php.ini configuration file to be used by the mail() function. However, there are exceptions when I want to use a different SMTP Server's IP to relay delivery of emails to External Domains. So, how to use SMTP Value in the mail() function. I think it has to be done in the Header Section of it...?


Any example?
 
Old 02-11-2010, 09:51 PM   #2
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware 14.1
Posts: 164

Rep: Reputation: 57
Which programming language are you using?
 
Old 02-11-2010, 11:53 PM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Quote:
in the php.ini configuration file
W.A.G says php ...
 
Old 02-12-2010, 09:28 AM   #4
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware 14.1
Posts: 164

Rep: Reputation: 57
I think that on Linux, the PHP mail() function is a front end to sendmail_path, which may be /usr/lib/sendmail. If you need to specify a relay then pear mail may be a better option.

http://pear.php.net/manual/en/package.mail.mail.php
 
Old 02-12-2010, 03:35 PM   #5
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by BenCollver2 View Post
Which programming language are you using?

I am using PHP.
 
  


Reply

Tags
function, mail, smtp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to send mail to some mail servers due smtp greetings malformed atotomex Linux - Networking 6 12-20-2005 05:38 PM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 08:44 PM
PHP Mail via SMTP newuser455 Programming 2 07-09-2005 11:01 PM
SMTP Mail lennysokol Linux - Networking 1 04-26-2005 08:27 PM
SMTP and KMail and SMTP and Netscape Mail jazz... Linux - Newbie 5 10-11-2003 04:49 AM


All times are GMT -5. The time now is 08:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration