Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new to perl

Status
Not open for further replies.

WebGodiva

Technical User
Jun 21, 2000
263
US
I am trying to get the formmail.pl script to work and send to multiple recipients at the same address. I have followed the directions in the readme file as shown by matt's script archive but i keep getting an invalid route address anytime I have more than one reciepient. Any help would be appreciated, the code that is going bad is below:

In the perl script itself:

@referers = ('64.224.42.236','mycompany.com','@recipients = ('site-blauvelt.com','^jeffreym@mycompany.com','^yvonneh@mycompany.com');


The code in the formfield is as follows:

<input type=hidden name=&quot;recipient&quot; value=&quot;jeffreym@mycompany.com,yvonneh@mycompany.com&quot;>
If I remove the second recipient the form works great but the minute I put the second recepient in, it gives me the invalid route address in the log file and it can't send the file.

I'm working off of an NT server.

I have about 6 recipients for the form so you can see my dilema.

Thanks for your time. Hope this helped!
 
Try escaping the at-signs in each email address in @recipients, like:

@recipients = ('site-blauvelt.com','^jeffreym\@mycompany.com','^yvonneh\@mycompany.com');

Also, what are the carat's(^) for in the mail addresses?
Hardy Merrill
Mission Critical Linux, Inc.
 
according to the readme file that comes with matt's script (formmail) the carat's indicate the beginning of a new e-mail address.

Still not working - below is the error I get from the sendmail program in my log file

Stalkerlab's SMTP Mailer V1.20

Local Host: ipswgw0001atl2

Looking up for mail gateway...
Remote Host Name: mail5.registeredsite.com
IP Address: 64.224.9.14

Connected to remote SMTP port:
220 mailhub.registeredsite.com ESMTP SMTP Service (NO SPAM/UCE)


Sending HELO ipswgw0001atl2...
250 mail5.registeredsite.com Hello smartnumbers.com [64.224.2.16], pleased to meet you


Sending MAIL FROM: <usa@registeredsite.com>...
250 2.1.0 <usa@registeredsite.com>... Sender ok


Sending RCPT TO: <jeffreym@site-blauvelt.com,yvonneh@site-blauvelt.com>...
553 5.1.2 <jeffreym@site-blauvelt.com,yvonneh@site-blauvelt.com>... Invalid route address


Sending QUIT...
221 2.0.0 mail5.registeredsite.com closing connection


WARNING: Mail NOT sent!
Cannot open file .\dead.letter.txt
Connection closed
Program aborted

Any other thoughts would be appreciated - it works fine with all other forms when only one recipient is being sent to and I've followed all of the directions in the readme file for having more than one recipient.

Thanks Hope this helped!
 
I've never used the formmail module, but I'm going to take a guess - according to the error that sendmail gives you, it looks to me like the 1st parameter you give @recipients is the domain, and the remaining parameters are email email address *for that domain* - does this sound right? If I'm right, then it would seem like each email address you provide to @recipients doesn't need to contain the domain. I'm just guessing here, but that's what it looks like to me. I really don't know why that is not working. Sorry I can't be more help.
Hardy Merrill
Mission Critical Linux, Inc.
 
Usually, e-mail addresses are separated by a semicolon when they are sent, i.e. someone@somenet.com;other@address.com

//Daniel
 
I have tried all of the above and nothing seems to be working. I'm ok if I just have one recipient but as soon as I add another, it goes all haywire. According to the readme, I have done everything properly. This script is found at worldwidemart.com (matt's script archive). I'm using it for other forms but they all have just one recipient and they work fine.

It doesn't like the semi-colon - the script calls for comma's as shown.


Any ideas would be appreciated - still hung up here. THANKS BUNCHES Hope this helped!
 
I use an older version of formmail and it calls for a comma seperating each recipient (No carats). If the readme calls for carats seperating each address, the script is reading the input fields from the form and you don't have the carats in there.
Try this.
<input type=hidden name=&quot;recipient&quot; value=&quot;@recipients&quot;>
Grizz2
 
tried that and the log returned, need address for recipients. I'm not sure what is going wrong. I've tried contacting the support for this script but no response. It's driving me crazy.

It seems everything they say is the way it is written in my code and I've looked over it a thousand times not and it's still not working.

Does anyone have any ideas on a better formmail script where I can have multiple recipients?

Your help is greatly appreciated. Hope this helped!
 
Hey Again
I have an older version of Matts formmail that works fine. If you like I can send it to you. It doesn't call for carats any where so it must be a different script. Those carats would bother me anyway. Let me know if you want it and we'll figure out a way to contact.
Grizz2
 
Thanks Grizz2, that would be great, you can e-mail it to me if you wish at yvonneh@site-blauvelt.com.

I appreciate all of your help. Hope this helped!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top