Closed Thread Icon

Preserved Topic: Email sending via Perl scripts (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20866" title="Pages that link to Preserved Topic: Email sending via Perl scripts (Page 1 of 1)" rel="nofollow" >Preserved Topic: Email sending via Perl scripts <span class="small">(Page 1 of 1)</span>\

 
Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-27-2001 00:59

OK, I know I asked this before, but i couldn't find the thread in this forum or the archives, so I'm just going to ask again, I guess.

How can I send an email to anyone from anyone via a server-side Perl script?

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 02-27-2001 05:07

And just as important, will it support file attachments. I can get the file submitted to the form without a problem.

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 02-27-2001 05:42

you need to open a pipe to sendmail

open(MAIL, "

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 02-27-2001 07:11

Slime, I already replied to your previous topic here.

Pugzly, sending attachments can be done, but you must MIME encode file before you pipe it to sendmail. The following perl modules - Mail::Sendmail, MIME::Lite, or MIME-Tools can help you do this (and you can get them from CPAN)

BTW I would suggest you to use SMTP to directly connect to mail server instead of using sendmail...

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-27-2001 22:36

Would this sendmail stuff be efficient with a large number of emails sent at once?

'Cause, you know, I'm trying to spam people to get them to come to my porn site.

Er, no, just kidding. I'm trying to set up a simple mailing list program for someone.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-28-2001 02:19

Oh, and what happens if I use this to send an email to an inexistant email address? Hopefully nothing, but I'd think that one of those "email could not be found" emails would be sent back, but where would they be sent back *to*?

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 02-28-2001 19:32

Slime, If you plan to send a lot of e-mails, I would suggest you to use SMTP to connect to mail server instead of pipeing output to sendmail. Also, you should not put a lot of e-mail addresses in the *to* field at once, because some mail servers will truncate it and e-mail won't be send to everybody (better method is to send every mail separatively using SMTP connection). Also, regarding bounced e-mail messages - they will be sent back to the address that is specified in the *from* field of the original e-mail, so be praperad to get a lot of shitty e-mails. Specifying bogus e-mail address in the *from* field is not a good idea in this case, because some mail servers will only send mail if the address specified in the *from* field is valid (SPAM protection).

Anyway, I would suggest you to see if the mail server that you will be using has built-in support for Mailing Lists and use that instead...



[This message has been edited by mr.maX (edited 02-28-2001).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-28-2001 20:03

Heh, yeah, it does have support for mailing lists, but I hate it. I have very little control over the program.

I'll look into that SMTP stuff.

Deviant
Bipolar (III) Inmate

From: the states
Insane since: Aug 2000

posted posted 02-28-2001 22:47

Can someone please write me a simple cgi that would take from a form and mail it to me? I have looked on the web and fine many of these but they all have way too many fields which I dont need. I just need one that will ask for the users email, subject and comments. It isn't going to be put on a commercial site at all so I cant really aford to pay you. But anyone thats up for it please get ahold of me.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-01-2001 03:22

If all you want is for the info to be mailed to you, just use ACTION="mailto:myaddress@whatever.com" and you don't even need a script.

Although I'm not sure this is 100% reliable.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 03-01-2001 06:38

Deviant, tkae a look at BNBFORM All-In-One Form Processing Script, it is very simple and gets the job done!

Slime, the method you specified AFAIK only works in IE...

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 03-01-2001 19:17

more importantly is there a sendmail script that works good on ActiveStates Perl for Win32?

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 03-01-2001 22:11

Boudga, when you want to send e-mails under Windows platform (no matter what language), you must use SMTP connection to directly access mail sevrer and the script that I specified above works under Windows, too...

Deviant
Bipolar (III) Inmate

From: the states
Insane since: Aug 2000

posted posted 03-02-2001 17:36

Cool thanks ... I was useing the action="mailto:" but that requires the user to have like outlook express and or netscape email to be configed. So thats why I am looking towards a CGI option.

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 04-23-2001 18:11

I'm revisiting using a direct connection to my smtp server for sending the results of a form can anyone provide me with a link on how to do so? I have an Exchange 2000 server.

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 04-23-2001 18:12

BTW I'm using activeState Perl

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 04-24-2001 06:54

Boudga, take a look at the link to BNBFORM from above (it has support for SMTP)...

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 04-24-2001 19:13

As far as bulk mail goes, I've been using Mail::Bulkmail for a while now, and thik its great. Grab it from CPAN.

And I agree that using a module is preferable to piping to sendmail in general.

« BackwardsOnwards »

Show Forum Drop Down Menu