Solved

Why can't I get sendmail to run

Posted on 1998-10-19
1
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

622 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