tags:

views:

9

answers:

1

http://github.com/NeilCrosby/multi-level-vcards/blob/master/via-email/geekMail-1.0.php

That's a link to the class. How can I set the smtp server?

My current code looks like:

require_once( 'assetform/geekMail-1.0.php' );
$geekMail = new geekMail();
$geekMail->setMailType('html');
$geekMail->from('[email protected]', 'no-reply');
$geekMail->to('[email protected]');
$geekMail->subject('Request');
$geekMail->message('this is a test email.');
$geekMail->attach($path.'1287448945.pdf');
A: 

Looking at the code of that class, there is no public setter for the $_smtpHost variable. You will either need to add one, or you can modifiy the geekMail-1.0.php file and change line 105 to contain your smtp server.

You will also need to make a public setProtocol method, or change $_protocol on line 97 from 'mail' to 'smtp'. This variable is being used to tell the class which protocol to use.

Alan Geleynse
I did that.. but it was still not using that SMTP server. Any clues? Check out line 1391, whats that?
vick
Looks like there is one other variable you need to change, I updated my answer. Line 1391 is a function called by _spoolEmail() based on the `$_protocol` variable.
Alan Geleynse
your the man!!!
vick