Skip to main content

PHPMailer

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php

require_once "class.phpmailer.php";

$mail = new PHPMailer;

$mail->From = "muhammad.kaleem@people.com.pk";
$mail->FromName = "Kaleem People";

$mail->addAddress("muhammad.kaleem@people.com.pk", "Kaleem Add Address Name");

//Provide file path and name of the attachments
//$mail->addAttachment("file.txt", "File.txt");
$mail->addAttachment("file.txt");  
$mail->addAttachment("../images/profile-pic.jpg");
$mail->addAttachment("../report/20090520-074141_sr-march09 dps.pdf"); //Filename is optional

$mail->isHTML(true);

$mail->Subject = "Subject Text Kaleem";
$mail->Body = "<i>Mail body in HTML</i>";
$mail->AltBody = "This is the plain text version of the email content";

if(!$mail->send())
{
    echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
    echo "Message has been sent successfully";
}
?>
</body>
</html>

Comments

Popular posts from this blog

100 quick and fascinating facts about the human body

The only part of the body that has no blood supply is the cornea of the eye. It receives oxygen directly from the air. The human brain has a memory capacity which is the equivalent of more than four terabytes on a hard drive. A newborn child can breathe and swallow at the same time for up to seven months. Your skull is made up of 29 different bones. When you sneeze, all of your body functions stop — even your heart! Nerve impulses sent from the brain move at a speed of 274 km/h. A single human brain generates more electrical impulses in a day than all the telephones of the world combined. The average human body contains enough sulphur to kill all the fleas on the average dog, enough carbon to make 900 pencils, enough potassium to fire a toy cannon, enough fat to make seven bars of soap and enough wate...

Memoery Managment Problem

http://www.doc.ic.ac.uk/~eedwards/compsys/index.html 1. Given five memory partitions of 100Kb, 500Kb, 200Kb, 300Kb, 600Kb (in order), how would the first-fit, best-fit, and worst-fit algorithms place    processes of 212 Kb, 417 Kb, 112 Kb, and 426 Kb (in order)? Which algorithm makes the most efficient use of memory?  First-fit:  212K is put in 500K partition  417K is put in 600K partition  112K is put in 288K partition (new partition 288K = 500K - 212K)  426K must wait  Best-fit:  212K is put in 300K partition  417K is put in 500K partition  112K is put in 200K partition  426K is put in 600K partition  Worst-fit:  212K is put in 600K partition  417K is put in 500K partition  112K is put in 388K partition  426K must wait  In this example, best-fit turns out to be the best. 2. Assuming a 1 KB page size, what are the page numbers and offsets for the following address refer...

Software Engineering Question

design patterns database normalisation database design database keys(primary,secondary, unique, composite) indexing joins, group by Link lists .NET architecture polymorphism diamond problem and its solution association, composition, aggregation copy constructor, shallow copy, deep copy coupling, cohesion Difference b/W interface and abstract class general oop diff b/W string="abc" and String string="abc" diff b/w int and int32 operating System (threading,diff b/w soft interrupt and hard interrupt, each programe in 32bit consumes how much memory) Codes both iterative and recursive with running times factorial fibonachi BFS,DFS Sequence Diagram Virtual memory Deadlock Binary search tree logical model, physical model how to delete 2nd or 3rd last element in linked list how to find midle element in linked list how to find whether a linked list is circuler or not scheduling Algorithm(FCFS, SJF, Prio, RRA)   How to find sequence lengt...