GK GK
asked on
Sending Mail from Linux servers
Hi Experts,
Can some body help me with code to send mails from Linux server which is connected to internet.
Thanks in Advance
Regards,
Can some body help me with code to send mails from Linux server which is connected to internet.
Thanks in Advance
Regards,
You could use sendmail,,,,
In /etc/mail/sendmail.mc file contains following line:
dnl define(`SMART_HOST',`smtp. your.provi der')
Replace "smtp.your.provider" with the fully qualified domain name to look like this:
define(`SMART_HOST',`my.re lay.server ')
Then restart
# service sendmail restart
In /etc/mail/sendmail.mc file contains following line:
dnl define(`SMART_HOST',`smtp.
Replace "smtp.your.provider" with the fully qualified domain name to look like this:
define(`SMART_HOST',`my.re
Then restart
# service sendmail restart
Is the machine already setup to send email?
There is a lot that goes into sending mail. You can configure postfix or sendmail to use your ISP email account to send mail which is the easiest way. What flavor of linux are you using?
There is a lot that goes into sending mail. You can configure postfix or sendmail to use your ISP email account to send mail which is the easiest way. What flavor of linux are you using?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
%mail person@example.com
from the command line, using ^D to end the message.
Of course, you have to make sure that your linux machine doesn't have any blocked ports, has sendmail running, is associated with a DNS so that others can find you, has a trusted site that it can relay mail from, etc, etc.
here is a tutorial on setting up sendmail: http://computernetworkingnotes.com/network-administrations/sendmail-server.html