Solved

Why can't I get sendmail to run

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Scripting vs. Programming languages 25 166
issue with beginner powershell script. 5 62
Facebook React and SyntheticEvents 6 67
Need some help with powershell script 5 50
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 …
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

822 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