Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged email
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A simple one page form with attachment that is meant to go straight to the email and not uploaded to the server. Emails an HTML version, a PlainText version and the attachment if there is one.
4
1258
posted 13 years ago by StevenW721
This snippet is a PHP function that checks if an email address is valid
2
909
posted 13 years ago by visudex
A simple example of how to send an email using PHP's build in mail() function.
0
712
posted 14 years ago by jprochazka
Stop a spam email form header injection attack - ie stop spammers from hijacking a web form to send junk mail
0
690
posted 14 years ago by flatearthcomms
I used to have the strlen block and the 2 preg if blocks each separately return false throughout, but lately I'm in a single point of exit mindset.
I cannot take credit for the regexps - I borrowed them from someone who borrowed them. If the real...
0
813
posted 14 years ago by philsown
PHP encrypts your E-mail address and generates the javascript that decrypts it. Most bots and spiders can't execute javascript and that is what makes this work.
3
1100
posted 14 years ago by fackz
This code will loop through any posted variables and print the name of the field as well as the value of the field.
0
758
posted 15 years ago by BFTrick
Very easy to use and helps keep browsers from jumbling your email up.
0
767
posted 15 years ago by dmautz1
E-mail validation is perhaps the most used validation in web forms, this code will validate email address and also optionally check the MX records of the domain provided in email address to make email validation more robust.
2
925
posted 15 years ago by paulgrenwood
With this snippet, you can encode any email address into HTML entities so that spam bots do not find it.
0
737
posted 15 years ago by paulgrenwood
I use this to activate basic forms for clients. Just make sure your form input names are named appropriately. Any inputs such as phone or fax that are separated into different inputs should have the same name.
1
931
posted 15 years ago by dmautz1
PHP
Sending multipart/alternative (text and html both together) email messages from PHP directly via sendmail
sendmail needs to be working and configured properly
uses popen and fputs
0
1216
posted 15 years ago by acosonic