Solved

Why can't I get sendmail to run

Posted on 1998-10-19
1
144 Views
Last Modified: 2013-12-25
I'm trying to set up a web site (trains.virtualave.net), but for some reason I can't get the sendmail program to work.  It's been driving me nuts for the past while so maybe one of you can help me.  All I need is the commandline.  Here's a section from www.virtualave.net 's FAQ on CGI:

Where is the Sendmail program on your server?
  Please use /bin/mail. Please be aware of that SPAM is not allowed on our server. If you need to
  send many mails, please use "sleep" to separate your mails by at least 5 seconds.
0
Comment
Question by:Aikema
1 Comment
 
LVL 1

Accepted Solution

by:
Strange earned 50 total points
ID: 1829187
These server dont allow you to user sendmail, however it
grants you permission for using /bin/mail (should be enougth
for simply sending mail)

You should use something like these in your cgi scripts:
#!/bin/sh
#...... some CGI body
/bin/mail -s "subject" address@his.provider < file_with_mail_body

or

some_programm_generating_mail_body|/bin/mail -s "subject" address

OR if you prefer perl
# .... CGI body
$subject="this is a subject";
$address="some@his.domain.com";
$mailprog="/bin/mail -s \"$subject\" $address";
open(MAIL,"|$mailprog");
print MAIL "This is a body of message";
close(MAIL);

And of course you should not forget about printing CGI output
headers like a
Content-type: text/html\n\n

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now