# Mail from cgi

**URL:** <https://boards.straightdope.com/t/mail-from-cgi/436850>\
**Category:** Factual Questions\
**Created:** [February 8, 2008, 8:59pm UTC](https://boards.straightdope.com/t/mail-from-cgi/436850 "2008-02-08T20:59:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [February 8, 2008, 8:59pm UTC](https://boards.straightdope.com/t/mail-from-cgi/436850/1 "2008-02-08T20:59:24Z")

</div>

I’ve created a nice survey, part html with a .cgi processor attached, and want to email the results. I work on UNIX, and the sendmail approach works fine. However the guy with the webspace is running Windows.

I’ve looked for some open source mailers, and found one that uses SMTP for the mail, but I’m running in firewall issues here. What makes it harder is that I don’t have direct access to his system, which makes it hard to experiment, and he had to ask support about what his SMTP server was. I know there are survey packages out there, but my form works fine already, and I want to learn this.

Anyone have a pointer to an open source cgi that does this reasonably well? It only has to be marginally documented; I’m reasonably clever with Perl.

Thanks all.

---

<div class="post-metadata">

**Author:** ![ZipperJJ](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zipperjj/32/211_2.png) [@ZipperJJ](https://boards.straightdope.com/u/ZipperJJ)\
**Post date:** [February 8, 2008, 9:07pm UTC](https://boards.straightdope.com/t/mail-from-cgi/436850/2 "2008-02-08T21:07:50Z")

</div>

Did you inquire with his host if there are any pre-installed scripts that you can use?

---

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [February 8, 2008, 9:32pm UTC](https://boards.straightdope.com/t/mail-from-cgi/436850/3 "2008-02-08T21:32:35Z")

</div>

[QUOTE=ZipperJJ]  
Did you inquire with his host if there are any pre-installed scripts that you can use?  
[/QUOTE]

Yes I did. They just gave the SMTP server name. I think this might be a web company that specializes in web hosting for the clueless.

I use AT&T for my ISP at home, and they don’t seem to support cgi for their standard web pages. They do have a forms package, but it would be a major pain to adapt. There are some free survey packages available also, but these have the same problem.

---

<div class="post-metadata">

**Author:** ![Terminus\_Est](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/terminus_est/32/3087_2.png) [@Terminus\_Est](https://boards.straightdope.com/u/Terminus_Est)\
**Post date:** [February 8, 2008, 9:52pm UTC](https://boards.straightdope.com/t/mail-from-cgi/436850/4 "2008-02-08T21:52:34Z")

</div>

You could possibly use something like [Net:SMTP](http://www.xav.com/perl/site/lib/Net/SMTP.html), which acts as an SMTP client that connects directly to an SMTP host.

---

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [February 8, 2008, 10:41pm UTC](https://boards.straightdope.com/t/mail-from-cgi/436850/5 "2008-02-08T22:41:00Z")

</div>

[QUOTE=Terminus Est]  
You could possibly use something like [Net:SMTP](http://www.xav.com/perl/site/lib/Net/SMTP.html), which acts as an SMTP client that connects directly to an SMTP host.  
[/QUOTE]

Thanks! I’ll give that a shot. I tried something like this, but Net:SMTP looks simpler.
