473,398 Members | 2,368 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,398 software developers and data experts.

how to put a list of the e-mail addresses that FormMail.pl can send e-mail to

Hi all,

I just want to ask what is the syntax to send the form to multiple email address

for example,

@allow_mail_to = qw(test@domain.com admin@domain.com);

the email will will only send to test@domain.com..im wondering how to send the email to admin@domain.com

i also try to put 2 lines for @allow_mail_to

@allow_mail_to = qw(test@domain.com);
@allow_mail_to = qw(admin@domain.com);

but this will not work..i try to put commas, etc. but will shows syntax error..

please advice..im really need this to be done..

thanks,
JV
Dec 16 '07 #1
4 3142
numberwhun
3,509 Expert Mod 2GB
Hi all,

I just want to ask what is the syntax to send the form to multiple email address

for example,

@allow_mail_to = qw(test@domain.com admin@domain.com);

the email will will only send to test@domain.com..im wondering how to send the email to admin@domain.com

i also try to put 2 lines for @allow_mail_to

@allow_mail_to = qw(test@domain.com);
@allow_mail_to = qw(admin@domain.com);

but this will not work..i try to put commas, etc. but will shows syntax error..

please advice..im really need this to be done..

thanks,
JV
First, where did you get the script from? Second, did it come with any examples or documentation?

The addresses may have to be comma or semi-colon separated. We would have to see the code of the script before we would know for sure.

Can you please post the code here, in the necessary code tags so that we can check it out?

Regards,

Jeff
Dec 16 '07 #2
First, where did you get the script from? Second, did it come with any examples or documentation?

The addresses may have to be comma or semi-colon separated. We would have to see the code of the script before we would know for sure.

Can you please post the code here, in the necessary code tags so that we can check it out?

Regards,

Jeff

Thanks Jeff,

I dowloaded the form from this link:
http://nms-cgi.sourceforge.net/scripts.shtml
it only need to change
Line 47 @referers = qw(domain.com);
Line 48 @allow_mail_to = qw(you@domain);

the example is only for 1 recipient..there is no example for multiple email addresses..
this form works fine for only 1 recipient..i try to put multiple recipients but with no luck ;)

im not so sure how this work..

the code goes like this: (i apologized if i put the code here)

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. #
  3. # NMS FormMail Version 3.14c1
  4. #
  5.  
  6. use strict;
  7. use vars qw(
  8.   $DEBUGGING $emulate_matts_code $secure %more_config
  9.   $allow_empty_ref $max_recipients $mailprog @referers
  10.   @allow_mail_to @recipients %recipient_alias
  11.   @valid_ENV $date_fmt $style $send_confirmation_mail
  12.   $confirmation_text $locale $charset $no_content
  13.   $double_spacing $wrap_text $wrap_style $postmaster
  14.   $address_style
  15. );
  16.  
  17. # PROGRAM INFORMATION
  18. # -------------------
  19. # FormMail.pl Version 3.14c1
  20. #
  21. # This program is licensed in the same way as Perl
  22. # itself. You are free to choose between the GNU Public
  23. # License <http://www.gnu.org/licenses/gpl.html>  or
  24. # the Artistic License
  25. # <http://www.perl.com/pub/a/language/misc/Artistic.html>
  26. #
  27. # For help on configuration or installation see the
  28. # README file or the POD documentation at the end of
  29. # this file.
  30.  
  31. # USER CONFIGURATION SECTION
  32. # --------------------------
  33. # Modify these to your own settings. You might have to
  34. # contact your system administrator if you do not run
  35. # your own web server. If the purpose of these
  36. # parameters seems unclear, please see the README file.
  37. #
  38. BEGIN
  39. {
  40.   $DEBUGGING         = 1;
  41.   $emulate_matts_code= 0;
  42.   $secure            = 1;
  43.   $allow_empty_ref   = 1;
  44.   $max_recipients    = 5;
  45.   $mailprog          = '/usr/sbin/sendmail -oi -t -f info@domain.com';
  46.   $postmaster        = '';
  47.   @referers          = qw(jdomain.com);
  48.   @allow_mail_to     = qw(info@domain.com);
  49.   @recipients        = ();
  50.   %recipient_alias   = ();
  51.   @valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
  52.   $locale            = '';
  53.   $charset           = 'iso-8859-1';
  54.   $date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
  55.   $style             = '/css/nms.css';
  56.   $no_content        = 0;
  57.   $double_spacing    = 1;
  58.   $wrap_text         = 0;
  59.   $wrap_style        = 1;
  60.   $address_style     = 0;
  61.   $send_confirmation_mail = 0;
  62.   $confirmation_text = <<'END_OF_CONFIRMATION';
  63. From: info@justonedomain.com
  64. Subject: form submission
  65.  
  66. Thank you for your form submission.
  67.  
  68. END_OF_CONFIRMATION
  69.  
=======
Thanks,
JV
Dec 19 '07 #3
numberwhun
3,509 Expert Mod 2GB
Fiirst, its not a problem that you placed the code in your post. That is what we actually prefer. What was a problem though is that you did not enclose the code in the code tags as I had asked that you do in my previous post. If you don't do this, we then have to clean up behind you.

As for the list of addresses, have you tried supplying multiple addresses on that particular line (as I had also previously suggested), and maybe separate each address with a comma or semi-colon?

Try that and see if it works.

Regards,

Jeff
Dec 19 '07 #4
KevinADC
4,059 Expert 2GB
read the "readme" file that comes with that script.
Dec 19 '07 #5

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

Similar topics

24
by: Arno R | last post by:
Hi all, I have a client with several shoe-shops. Customers can leave their email-address if they want to be notified when there is a sale. Input is validated with instr() I am checking for @...
2
by: tthomas | last post by:
Greetings, I am using CDO.Message to send email messages from my application. I now need to send email to existing distribution lists in our Global Address List. However, our exchange server...
3
by: g0c | last post by:
hi, how to hide or replace email addresses in php mail function with something like "group" so the email addresses to which email is sent are not visible ? i have : $subs = "email1@dot.com,...
0
by: dreamsoul620 via AccessMonster.com | last post by:
Hi all! I'm trying to set up an email application for my database. I tried linking to my Outlook address book, but when reading from the table, I receive an error message saying I need to restart...
1
by: donet programmer | last post by:
Is there a way to map multiple email addresses, for instance emailadd1@domain.com, emailadd2@domain.com.. etc to one email address emailadd@domain.com such that when an email is sent to emailadd1...
1
by: kumana1 | last post by:
This site is fantastic, first of all. Second of all, thank you for your time in this matter. I have been using some code that was posted on here (I apologize for not being able to remember who)...
5
by: Mike | last post by:
I have a page with a textbox that a user can enter in mutliple email addresses such as: user1@yahoo.com;user2@yahoo.com;user3@gmail.com; and so on, I then have a foreach loop to get all of the...
4
by: chris | last post by:
I need to maintain a list of subscribers to an email list for a "newsletter" that will be sent via a web form probably once a month. I anticipate low numbers--tens to maybe one hundred subscribers...
1
beacon
by: beacon | last post by:
Hi everybody, I'm sure that everyone cringes when they see "email" in the subject for posts in the forum, but I'm hoping that what I'm trying to do is different enough to present a challenge...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.