11 Reusable Code Snippet Topics
Remove Filter ![]() | |
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 … | |
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` … | |
![]() | 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 … |
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, … | |
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 ![]() | |
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] | |
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. | |
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; … | |
Dig up this for discussion thread request and some Googling. By little experiment found the different forms for sending message commands. Could no send in Python3 the code of program itself so only simple test "Hello". Sorry that subject is left incorrectly refering program name. | |
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. | |
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 … |