Blog Master
12-14-2008, 04:34 AM
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:
<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">
</p>
</form>
And the form-mailer.php file contains this code to process the form:
// 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.
<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">
</p>
</form>
And the form-mailer.php file contains this code to process the form:
// 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.