Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > accessing smtp with php

accessing smtp with php
Thread Tools
barbarian
Senior User
Join Date: Apr 2001
Location: Palo Alto, CA
Status: Offline
Reply With Quote
Jul 12, 2004, 02:44 PM
 
I was wondering if it is possible to access smtp via php...

For years we've been using a simple form processor that sends mail via sendmail.... but on one particular server sendmail is turned off although we have access to smtp.

Any ideas on how convert this bit of code so it uses smtp?

$Message = "<font face=verdana size=2>".$Message."</font></body></html>";
mail( $MailToAddress, $MailSubject, $Message, "Content-Type: text/html; charset=ISO-8859-1\r\nFrom: $name <$email>\r\nBCc: $MailToCC");
header("Location: ".$redirectURL);
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jul 12, 2004, 03:36 PM
 
Originally posted by barbarian:
I was wondering if it is possible to access smtp via php...

For years we've been using a simple form processor that sends mail via sendmail.... but on one particular server sendmail is turned off although we have access to smtp.

Any ideas on how convert this bit of code so it uses smtp?

$Message = "<font face=verdana size=2>".$Message."</font></body></html>";
mail( $MailToAddress, $MailSubject, $Message, "Content-Type: text/html; charset=ISO-8859-1\r\nFrom: $name <$email>\r\nBCc: $MailToCC");
header("Location: ".$redirectURL);
Use this:

http://phpmailer.sourceforge.net/

It supports SMTP and a lot more. Very nice.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
barbarian  (op)
Senior User
Join Date: Apr 2001
Location: Palo Alto, CA
Status: Offline
Reply With Quote
Jul 13, 2004, 04:10 AM
 
awesome... thanks.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:59 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,