Solved

Send form to multiple e-mails

Posted on 2000-02-14
2
153 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 200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need some help with powershell script 5 65
Error when Running powershell script 6 45
Open new WPF windows - powershell 4 35
change script to get csv file on the prompt 8 31
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
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 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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

734 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