Re: mail smtp class file

From: Date: Thu, 22 Nov 2001 04:49:08 +0000
Subject: Re: mail smtp class file
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-75473@lists.php.net to get a copy of this message
thank you for that but we need a customized mailer system for our development and im just new with this type of system, i just want to make sure that i really understand the program flow of the mailer script .This is just a start and the sample script is very simple to understand for a newbie like me. Any idea with my problem? > You may want to look at something a little more robust. > > Try http://phpmailer.sourceforge.net > > Adding attachments and numerous other options is extremely easy. > > Quoting "Michael P. Carel" <mikecarel@team5.teamglac.com>: > > > Hi there, > > > > I've tried using the SMTP class file that was given by PHPGalaxy.com > > previously in the mailing list, and have difficuties in using it. upon the > > execution of the script im recieving the mail but the content of the mail > > was the HEADER. Here's the script: > > <? > > function sendmsg($to, $subject, $text, $from, $file, $type) { > > $content = fread(fopen($file,"r"),filesize($file)); > > $content = chunk_split(base64_encode($content)); > > $uid = strtoupper(md5(uniqid(time()))); > > $name = basename($file); > > $header = "From: $from\nReply-To: $from\n"; > > $header .= "MIME- Version: 1.0\n"; > > $header .= "Content-Type: multipart/mixed; boundary=$uid\n"; > > $header .= "--$uid\n"; > > $header .= "Content-Type: text/plain;\n"; > > $header .= "Content-Transfer-Encoding: 7bit\n\n"; > > $header .= "$text\n"; > > $header .= "--$uid\n"; > > $header .= "Content-Type: $type; name=\"$name\"\n"; > > $header .= "Content-Tranfer-Encoding: base64\n"; > > $header .= "Content-Disposition: attachment; filename=\"$name\"\n\n"; > > $header .= "$content\n"; > > $header .= "--$uid--"; > > mail($to, $subject, "", $header); > > return true; > > } > > $to = "mikecarel@team8.teamglac.com"; > > $subject = "test message"; > > $text = " This is just a test message from the MIS group"; > > $from = "mikecarel@teamglac.com"; > > $file = "test.zip"; > > $type = "application/zip"; > > sendmsg($to, $subject, $text, $from, $file, $type); > > print("message sent"); > > ?> > > > > And the email content was this: > > > > MIME- Version: 1.0 > > Content-Type: multipart/mixed; bountry=4C67EBB57A700797D865BFD2E30B7E01 > > --4C67EBB57A700797D865BFD2E30B7E01 > > Content-Type: text/plain > > Content-Transfer-Encoding: 7bit > > > > This is just a test message from the MIS group > > --4C67EBB57A700797D865BFD2E30B7E01 > > Content-Type: application/zip; name="test.zip" > > Content-Tranfer-Encoding: base64 > > Content-Disposition: attachment; filename="test.zip" > > > > dGhpcyBpcyBqdXN0IGEgdGVzdCB6aXAgZmlsZSBrdW5vISEhIQ== > > > > --4C67EBB57A700797D865BFD2E30B7E01-- > > > > Any idea, im this new in this type of program. > > > > > > > > > > > > Regards, > > > > Mikecarel > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > ------------------------------------------------- > This mail sent through IMP: http://horde.org/imp/

« previous php.general (#75473) next »