Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have CentOS 4.4 and I would like to set up PHP so it will email a remote SMTP server when it sends mail. This being my ISPs SMTP server.
I did this on my test windows box:
Code:
[mail function]
; For Win32 only.
SMTP = mail.optonline.net
; For Win32 only.
sendmail_from = jcink@jcink.com
; SMTP port
smtp_port=25
My current email server is sendmail. That's what PHP is configured to use.
And this worked fine, it sent mail without a problem at all. But what is the Linux way to get this done? I've tried google searching, and I didn't come up with a lot of helpful results. I tried configuring a program called minisendmail, but it didn't work for me.
Do you mean you want to specify the mail server that the mail() function will use, or you just a method to do it - not necessarily with mail() function?
Do you mean you want to specify the mail server that the mail() function will use, or you just a method to do it - not necessarily with mail() function?
Hi,
I would like just the mail(); function to work. It has to be mail();, not something like phpmailer package.
I've been trying to get sendmail to send to a remote host but I've been pulling my hair out. My ISP doesn't require auth, and I have sent numerous emails through just telnet just fine. Yet whenever I try
define(`SMART_HOST',`mail.optonline.net')
it doesn't work. no emails get sent.
Quote:
[root@localhost ~]# echo hello | sendmail -v jcink2k@gmail.com jcink2k@gmail.com... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Tue, 1 May 2007 15:40:26 -0400
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@localhost.localdomain> SIZE=6 AUTH=root@localhost.localdomain
250 2.1.0 <root@localhost.localdomain>... Sender ok
>>> RCPT To:<jcink2k@gmail.com>
>>> DATA
250 2.1.5 <jcink2k@gmail.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l41JeQdv016831 Message accepted for delivery jcink2k@gmail.com... Sent (l41JeQdv016831 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
It seems to be totally igoring my smart host (?) also, no email gets delivered, even though it says it was sent and accepted... I have tried even turning off the firewalls and no luck.
I have this working if I remove the SMART_HOST. I've been running this mail server the whole time off port 25 and it is working fine, but my issue is that I've been blacklisted and have put up with it for the longest time. Then I discovered this method could be used to get around the blacklist, use my ISP instead of my own. Which is why I'm doing this.
Interesting... I can't explain that one... Anyone else?
Hi,
It's ok, thanks anyway. I'm not sure why, but it decided to start working today. Heh... mail is sending fine, and when I do the test, it picks up optimums information. I'm not sure what happened, but I'm glad it works.
I recommend using a third party software. I am using XPM2 for sending mails from within php under linux. It is a mail class written by the folks at xpertmailer.com. I am using it currently to send mails by gmail using TLS. It works flawlesly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.