10 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for digital-ether

Here is a PHP class written for PHP4 and PHP5 that will validate email addresses by querying the SMTP (Simple Mail Transfer Protocol) server. This is meant to complement validation of the syntax of the email address, which should be used before validating the email via SMTP, which is more …

Member Avatar for lps
0
4K
Member Avatar for cereal

When using emails as usernames you want them to be unique over your table, but this can be a problem if you consider a GMail account, because of their [username](https://support.google.com/mail/answer/12096?hl=en) [policy](https://support.google.com/mail/answer/10313?hl=en). They allow: * dots * digits * letters * plus addressing text by using the `+` sign, i.e. `orange+juice@gmail.com` …

Member Avatar for cereal
2
651
Member Avatar for diafol

Hi All, Been a bit bored, so went at it to create a class from some long procedural stuff I found littered in various guises all over the web. The code I used as a base for the class came from [here](http://www.codediesel.com/php/downloading-gmail-attachments-using-php/). As this uses IMAP functions and many of …

4
3K
Member Avatar for coreyavis

This is a function I created to facilitate the sending of PHP emails. Just give it the name and email of who your sending it to, and your name and email. A subject and a message. These options are required. The type, cc and bcc options are optional. By default, …

Member Avatar for Airshow
1
833
Member Avatar for tekagami

1) onkeyup send textarea values to script 2) converts textarea value to array 3) loops thru the array 4) uses regex to check if its an email address 5) changes inner html of recipient div

Member Avatar for LastMitch
1
365
Member Avatar for kingsonprisonic

This module is for validating textboxes.... After using this module in your project you can simply validate all of your text boxes like [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AssignValidation(Me.TextBox1, ValidationType.Only_Digits) AssignValidation(Me.TextBox2, ValidationType.Only_Characters) AssignValidation(Me.TextBox3, ValidationType.No_Blank) AssignValidation(Me.TextBox4, ValidationType.Only_Email) End Sub [/CODE]

Member Avatar for Iamateur
4
1K
Member Avatar for TrustyTony

Inspired by discussion in [url]http://www.daniweb.com/tutorials/tutorial238544.html[/url] (test cases are from there) I used my magic pattern matching function transformed from numbers and adding the parts length checking loop. I like my own solution better, I do not know about you.

Member Avatar for TrustyTony
0
2K
Member Avatar for thines01

Here is a technique I use for sending an email using GMail. Notice: You might need to change your email settings under [B]Forwarding and POP/IMAP[/B] inside your GMail settings (to Enable POP). Here is a test program for using the class library (shown in the snippet box): [CODE] using System; …

0
708
Member Avatar for ApocDen

for this to work you need to add some text boxes and name them accordingly, make sure when you add a text box add [CODE]$_POST["new_text field"] = $new_text field;[/CODE] etc etc. html coding can be used within the html tags only.

Member Avatar for metalix
0
226
Member Avatar for scaiferw

I wrote this code because I wanted the members of my volunteer organization go have a place they could easily get the most current list of email addresses to send a message. This code reads the names and addresses from the database, and creates a comma delimited list of addresses …

0
136

The End.