Email With Attachment

Generally we use to send text/html mails in PHP by mail() function, this function is not providing to sent attachment file by default, so here i write a function using mail() function to send the email with attachment.

Below is that I wrote and modified to send email with attachment and how to use this function.

I'm a web developer / PHP programmer. I am also working on custom plugin development of wordpress.