Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Send form to multiple e-mails

Posted on 2000-02-14
2
Medium Priority
?
156 Views
Last Modified: 2013-12-25
Good Morning,
I'm not sure how to phrase this question...so here's what I want to do...
I would like our members to be able to create a resume online, save it and be able to e-mail it to multiple e-mail addresses at one time, or, e-mail it from the job page, (button examples:  "home", "next job", send resume for this job", etc..)  
We have a cgi-bin, unix platform and I have FrontPage98 for editing but I don't have to use it.
Any help would be greatly appreciated!!
0
Comment
Question by:Engarde
[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
2 Comments
 
LVL 16

Accepted Solution

by:
maneshr earned 800 total points
ID: 2519085
if you are using PERL, here's something you can try


#!/usr/local/bin/perl

use CGI;
$query=new CGI;

print "Content-type: text/html\n\n";

if ($query->param()){ ##  Called via the POST method
  $res=$query->param('resume');
  $eid=$query->param('eid');  ##  Get the list of Email ids
  $from=$query->param('from');  ##  Get the Email id of the sender
  $subject="Resume of XYZ";

  $card = "2142000.html"; ##  Can be any other filename too!!
  open(RES, ">/tmp/$card") || die $!;
  binmode RES;

  print RES res,"\n"; ##  Write the resume to the file

  close (RES);

  if(&send_mail($eid,$from,$subject,$res)){## Send the actual mail out
    print "Mails have been sent out!<br>\n";
  }else{
    print "Errors sending out Mails!<br>\n";
  }


}else{
  print "<HTML>
  <FORM METHOD=POST ACTION=\"".$ENV{SCRIPT_NAME}."\">
  <TEXTAREA name=resume rows=20 cols=85>
  Enter Your Resume here
  </TEXTAREA><P>
  Enter the email ids you want to send this resume to<br>
  <I>(Eg. a\@aol.com, xyz\@hotmail.com)</I><BR>
  <INPUT TYPE=TEXT NAME=eid size=87>
  <INPUT TYPE=HIDDEN NAME=from value=\"me\@here.com\">
  <P>
  <INPUT TYPE=SUBMIT VALUE=\"Send Now!!\">
  </FORM>";
}

sub send_mail(){
  ($to,$from,$subject,$message)=@_;

  $to=~ s/@/\\\@/g; ##  Escape the @ chars

  $mailprog ="/usr/sbin/sendmail";
  open(MAIL, "| $mailprog -t ");
  print MAIL "To: $eid\n";
  print MAIL "From: $from\n";
  print MAIL "Subject: $subject\n";
  print MAIL $message,"\n";

  close(MAIL);
  return 1;
}
0
 

Author Comment

by:Engarde
ID: 2530667
Thank you very much!  I'll try it and come back if I have additional questions!
Thanks again!
Engarde
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
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 if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
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.
Suggested Courses

604 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