473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Email Perl Script Issue

Hi All,

I need some expertise Perl help.....

Basically i have an Email perl script that i use on alot of my sites, which basically E-mails the filled in form to a specified e-mail address. nms_formail.pl is the name of the perl script, in case anyone has got it themselves.

I now need to change it slightly, but don't know how to......

I want to be able to email the form to different address depending on what email address is selected on the form using a tick box.

FOR EXAMPLE

<input type="checkbox" name="Emial1" value="mailto:test@test.com">
<input type="checkbox" name="Email2" value="mailto:test2@test2.com">
<input type="checkbox" name="Email3" value="mailto:test3@test3.com">

The code is wrong for those tick boxes, but you get the idea,

So when a user selects 2 of the text boxes, the email gets sent to those select tick boxes ONLY, and not the deselected on.



If anyone could shine some light on this, that would be great. If you would like me to pose the script text of the perl script please say so and i will.

Thanks again
Apr 4 '07 #1
2 1642
KevinADC
4,059 Expert 2GB
Have you tried the nms support forum? I know that many questions go unaswered there but yours might not. That would be the place to start since those guys and gals know the script forwards and backwards. Or hire a programmer for a modest fee to customize the script and make sure the changes are safe and work properly.

As a side not, I would not put any email addresses in the html form. I believe the script documentation explains a way you can do that.
Apr 4 '07 #2
I did something vaguely similar [doing conditional things in the script based off a web form's checkbox] last year for a study project. While I didn't do emails based off of it the basic idea is the same. YMMV.

Expand|Select|Wrap|Line Numbers
  1. # define the email addresses in Perl so they are safer from prying eyes
  2.  
  3. $my email1Destination = 'example1@domain.com';
  4. $my email2Destination = 'example2@domain.com';
  5. $my email3Destination = 'example3@domain.com';
  6.  
  7. # now grab the input from the checkboxes
  8.  
  9. if (my $email1 = param('Email1')) { # if the checkbox "Email1" is selected, do this
  10.  
  11.     # send the email to $email1Destination
  12.  
  13. }
  14.  
  15. if (my $email2 = param('Email2')) {
  16.  
  17.     # send the email to $email2Destination
  18.  
  19. }
  20.  
  21. if (my $email3 = param('Email3')) {
  22.  
  23.     # send the email to $email3Destination
  24.  
  25. }
  26.  
  27.  
David
Apr 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Keith | last post by:
All: What is the difference between Perl (CGI) and PHP (Apache module)? I thought both used servers to direct the user to the appropiate Perl or PHP program in order to execute the program to...
0
by: M Wells | last post by:
Hi All, I'd like to write myself a perl program to handle a received email on a specific account associated with my web site and put its contents into a known table in my site's database. My...
3
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then...
0
by: John Silver | last post by:
I have a perl script running on machine A, a web server. A visitor completes certain pieces of data and these are compiled into two emails, one addressed to the visitor and copied to the site...
3
by: PzYon | last post by:
Hey 2gether! I'm trying to execute a PERL script on the web server when the user presses a button in an ASP.NET Web Application using Visual Basic. The most obvious solution for me seemed to be...
1
by: byrapaneni | last post by:
Hello all; I gathered information from this and several other groups to write a perl & cgi script to display a pdf document. My script works partially and found an issue when testing. Here is...
1
by: graphman | last post by:
I have a perl script that I'm calling using php's shell_exec that uses an expect module to go to another system to pull tiff files. The php perl combination works great when I launch from the...
1
by: rahulthathoo | last post by:
Hi, After i finish some amount of computation using a perl script, i need to send out an email to a receipient which can change and is known to the Perl script. Is there a way to call the...
1
by: Rebles | last post by:
Hi, I just posted this in the MS SQL Section, but maybe my problem is rooted in Perl, so it's more appropriate to post here instead (sorry for the double post) I'm writing a PERL script to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.