Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 12-14-2008, 04:34 AM
Blog Master Offline
forum loafer
 
Join Date: Dec 2008
Posts: 11
Lightbulb SMTP Contact Addon Help

I am wondering if someone can help me with the final piece of this puzzle? I don't want to use the current contact addon as it uses my hosts mail servers which have been flagged for major spam violations. They are weak mail servers. So... I want to use an SMTP mailer thru my google email account instead. I have written a form for my template's contact page and a form handler to process the form on a separate php page called form-mailer.php. The form looks like such from my contact_template.html file:

Quote:
<form name="contactform" action="form-mailer.php" method="post">
<p>
<label>Full Name</label>
<input name="Name" value="" type="text" size="30" />
<input type="hidden" name="Required" value="Name,Email,Comments">
<label>Contact Email</label>

<input name="Email" value="" type="text" size="30" />
<label>Your Comments</label>
<textarea name="Comments" rows="5" cols="5"></textarea>
<br />
<input type="submit" value="Send Message" name="submitform"> &nbsp;
</p>
</form>
And the form-mailer.php file contains this code to process the form:

Quote:
// Edit The following Parameters

$mailTo = "youremail@gmail.com"; // The address that will receive form submissions
$mailSubject = "Incoming Photo Blog Email"; // Whatever you want
$mailHost = "smtp.gmail.com."; // Usually looks like mail.yourhost.com
$mailPort = "25"; // Usually 25
$mailAuth = true; // "true" if your mail server requires authentication, "false" if not
$mailPassword = "myemailpassword"; // The mail password associated with $mailTo
Can someone write an addon file that allows pixelpost users to enter the above in their admin screen and adjust the "form-mailer.php" file to look to the MySQL database for these simple variables so users don't have to edit the php file manually. I would then need to know how to adjust this php file and could release the whole thing as a Contact SMTP addon.
Reply With Quote
  #2  
Old 12-14-2008, 06:51 PM
photography's Avatar
photography Offline
pp regular
 
Join Date: Apr 2008
Location: Romania
Posts: 25
Send a message via Yahoo to photography
It' in fact very easy to use GMail in this kind of situations. I've never used it with pixelpost, but I did it with the forum I host on my webpage, the configuration is pretty much the same.

First of all check with phpinfo() if your host has configured php to use ssl, tls. You'll have something like that:

Code:
Registered Stream Socket Transports: ...., ssl, sslv3, sslv2, tls, ...
If you do, it means you can use gmail service as smtp server. All you have to do is configure the options like this:

Code:
// Edit The following Parameters

$mailTo = "youremail@mail.com"; // The address that will receive form submissions
$mailSubject = "Incoming Photo Blog Email"; // Whatever you want
$mailHost = "ssl://smtp.gmail.com"; // Usually looks like mail.yourhost.com
$mailPort = "465"; // Usually 25
$mailAuth = true; // "true" if your mail server requires authentication, "false" if not
$mailPassword = "myemailpassword"; // The mail password associated with $mailTo
What I cannot see above is username; you should also have the username configured to be something like

Code:
$mailUser="youremail@gmail.com"
I haven't use this addon, neither downloaded it, I've just pointed out the solution. I hope it will work.

All the best!
__________________
· I'm sorry if I make some mistakes here and there, english is not my native language.
· Successfully using this method to fight spam since 01.03.2008. Spam comments encountered so far: 0.
· photography - my website
Reply With Quote
  #3  
Old 12-14-2008, 08:27 PM
Blog Master Offline
forum loafer
 
Join Date: Dec 2008
Posts: 11
I Want To Release This as an Addon

Photography... Thanks... but I know it works. I am using it now. I just want to release it as an addon for all pixelpost users. I just don't know how to make the php file read the MySQL database so programming challenged users don't have to edit the php file. Can someone qrite an addon that fills in the variables on the php file. Is that possible?

A SMTP addon would rock!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 11:46 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs