Jump to content

Mailing Through SSL Area


DiviNeo

Recommended Posts

Dear Forums Members,

I have a small problem, and I hope you'll assist me solving it out.
I've made a simple HTML form, which contains fields such as:
Sender's Name, Sender's E-mail Address, Message's Subject and Message's Content.
The problem is that when I execute the PHP mail() function, I receive to my Outlook Express inbox a message with X letters only.
For example, if I wrote "Hello World" as the message's subject, and the sender's name is "Agent Smith, I get them both as "XXXXX XXXXX".
The PHP code is as folowing:

[code]
$sender_name=$HTTP_POST_VARS['sender_name'];
$from=$HTTP_POST_VARS['sender_address'];
$subject=$HTTP_POST_VARS['message_subject'];
$message_content=$HTTP_POST_VARS['message_content'];

$body ="<html dir=\"rtl\">\n";
$body.="<body bgcolor=\"#ffffff\" link=\"#0000ff\" alink=\"#0000ff\" vlink=\"#0000ff\">\n";
$body.="<div style=\"color: #000000; font-size: 10pt; font-family: arial\">\n";
$body.="$message_content";
$body.="</div>\n";
$body.="</body>\n";
$body.="</html>\n";

$headers ="Content-Type:text/html; charset=windows-1255\n";
$headers.="Content-Transfer-Encoding: 8bit\n";
$headers.="X-Priority: 3\n";
$headers.="X-Mailer: PHP\n";
$headers.="X-PHP-Mail-Priority: Normal\n";
$headers.="Return-Path: <$from>\r\n";
$headers.="From: \"$sender_name\" <$from>\r\n";
$headers.="Reply-to: <$from>\r\n";

@$send=mail("[email protected]","$subject","$body","$headers");
[/code]

Thanks in advance, DiviNeo.
Link to comment
https://forums.phpfreaks.com/topic/30865-mailing-through-ssl-area/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.