Jump to content

[SOLVED] SMTP server...


bossman

Recommended Posts

I recently found a tutorial online on SMTP authentification for sending emails from webpages, here is the tutorial here...

 

http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

 

here is the webpage I'm utilizing it on...

 

http://www.adobedayevents.com/project_request/project_request.php

 

i'm not getting an error about the SMTP server anymore, but rather an even weirder one...

 

Fatal error: Class 'Mail' not found in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request_2.php on line 51

 

line 51 is this...

 

$smtp = Mail::factory('smtp',

 

which is a part of this code block...

 

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));

 

Can anybody tell me why on earth 'Mail' isn't a class? I know someone else who used this script for there website and it is working fine with that Mail::factory chunk in it. Anyone have a clue why it won't work on mine? Server setting? configuration??

Link to comment
https://forums.phpfreaks.com/topic/180895-solved-smtp-server/
Share on other sites

PEAR is essentially a php framework made up of a base installer/core and separately installed php scripts. The phpinfo() output only contains an include path entry that does not necessarily indicate that any portion of the PEAR scripts are present.

 

You can in fact install your own copy of PEAR, including the Mail package. The instructions are on the pear.php.net web site.

 

There are other mailer classes, such as phpmailer and SwiftMailer that don't require the installation of as much code.

Link to comment
https://forums.phpfreaks.com/topic/180895-solved-smtp-server/#findComment-954314
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.