Solved

Why can't I get sendmail to run

Posted on 1998-10-19
1
142 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
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)

746 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

11 Experts available now in Live!

Get 1:1 Help Now