Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Programming Week 9 Old Dominion University Department of Computer Science CS 418/518 Fall 2010 Martin Klein 10/26/10.

Similar presentations


Presentation on theme: "Web Programming Week 9 Old Dominion University Department of Computer Science CS 418/518 Fall 2010 Martin Klein 10/26/10."— Presentation transcript:

1 Web Programming Week 9 Old Dominion University Department of Computer Science CS 418/518 Fall 2010 Martin Klein 10/26/10

2 Sending E-Mail PHP syntax: mail($to, $subject, $message, $headers); e.g. <?php mail("cs518f10@gmail.com", "My status line", "If I could only think of a msg I would put it here..."); echo "congrats, your email was sent"; ?> (see firstmail.php, ch10)

3 Sending E-Mail $to = "cs518f10@gmail.com"; $subject = "My subject line"; $message = " If I could only "; $message.= " think "; $message.= " of a msg "; $message.= " I would put it here. "; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "Content-Transfer-Encoding: 7bit\r\n"; mail($to, $subject, $message, $headers); (see secondmail.php, ch10)

4 From mklein@cs.odu.edu Mon Aug 16 09:33:57 2010 Return-Path: Received: from mail.cs.odu.edu (darkisland.csnet.cs.odu.edu [128.82.4.212]) by unixmail.cs.odu.edu (8.14.2/8.14.2) with ESMTP id o7GDXuSY015967 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT)for mklein@unixmail.cs.odu.edu>; Mon, 16 Aug 2010 09:33:57 -0400 (EDT) … MIME-Version: 1.0 … Subject: Email was hacked, I apologize it is fixed now. From: john doe To: Martin Klein Content-Type: multipart/alternative; boundary="001485f626f00069b6048df0e27f“ … --001485f626f00069b6048df0e27f Content-Type: text/plain; charset="ISO-8859-1" In case a message with a link was sent from me my email was corrupted and sent out to my inbox. I have fixed the account and apologize for the inconvenience. John -- John M. Doe --001485f626f00069b6048df0e27f Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable In case a message with a link was sent from me my email was corrupted and sent out to my inbox. I have fixed the account and apologize for the in convenience. =A0 John -- John M. Doe --001485f626f00069b6048df0e27f-- Trailing -- indicate end of msg!


Download ppt "Web Programming Week 9 Old Dominion University Department of Computer Science CS 418/518 Fall 2010 Martin Klein 10/26/10."

Similar presentations


Ads by Google