Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.