views:

45

answers:

2

I recently started working on a web project which was already in progress; the guy who built the foundation for it had the signup page sending the form fields to a formmail Perl script, so that he could get an email when a user signs up. I'm not familiar with Perl, and my inclination is to just use the PHP mail() function and drop the Perl script, rather than spend time trying to figure out how to use it correctly.

So, is there any good reason to keep using the Perl script, or should I just advise him to drop it in favor of PHP mail? Any pros and cons, or is it entirely subjective?

I realize that this question may be flagged as subjective; just looking for advice.

+7  A: 

If by formmail, you mean formmail drop it immediately, and replace with something better designed and written like nms TFMail.

I do not know anything about said "php mail" to comment on that.

Sinan Ünür
yeah, it claims to be NMS FormMail Version 3.14c1
Sam Dufel
+3  A: 

I'd recommend a third option: an external PHP mailer class, such as PHPMailer. This gives you the advantage of not mixing languages unnecessarily as well as not having to figure out the quirks of mail(). It also does things like SMTP email itself, if required, and can assemble attachments and alternate sections. mail() can do none of that.

PHP's mail() function needs to be caught and shot. It's one of the quirkiest and odd functions that PHP has and requires some knowledge of how SMTP and often MIME work to call. If you do want to figure out how to use, put it behind an API call once you have.

staticsan
I suppose I should clarify - I've been using the standard php mail() for quite a while. I already have it built into the site for email verification and password reset requests. I'm just wanting to know if there's any particular advantage to using a separate perl script
Sam Dufel
If there's nothing else on the site in Perl, then no.
staticsan
Alright, thanks
Sam Dufel