Contributions > Plugins, tips, and tricks
Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
wansim:
Good thinking! I took a queue from your suggestion.
I made "Leave a message" form send email using the same code that handles our contact form page. This means that since our contact form already send email, I can use the same code for the "Leave a message" form.
I made a copy of docontact.php and saved it under mibew directory (i.e the same location as leavemessage.php), webim/
I went to leavemessage.tpl from syle/default/template/ (under my mibew settings from admin dashboard, i chose default )
I changed the form action under leavemessage.tpl from ${mibewroot}/leavemessage.php to ${mibewroot}/docontact.php (remember, docontac.php is the php page that handles our website's contact form submission)
I ensured that the names of the form fields in leavemessage.tpl matched the name of the posted form fields in the docontact.php
e.g in leavemessage.tpl, name field=name, email field = email, message field=message
in docontact.php, name=$_POST['name'], email=$_POST['email'], message=$_POST['message']
Very happy with the result. Hope this helps someone like other mibew tips helped me :)
--- Quote from: mcrosby on April 08, 2012, 06:51:20 PM ---Great support tool, but can we please get SMTP mailing built in to the script? The vast majority of hosts now block php mail.
Either that, or could you please post some up to date instructions? The script seems to have changed so much that these instructions no longer make any sense.
For now I'll be editing the script to go to a different page when everyone is logged out.
This is a very popular thread on this forum by views (7000+ views) so maybe this should be dealt with quickly?
As a temporary fix, I've replaced the leavemessage.tpl file with the following code:
--- Quote ---<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml ">
<head>
<title>Leave a Message</title>
<meta http-equiv="refresh" content="0; url=../message.php">
</head>
<body>
</body>
</html>
--- End quote ---
Then in the directory before /webim/, just put a file called "message.php", and set it up to send a message to you there.
--- End quote ---
crackeclypse:
Thanks This works perfectly
Navigation
[0] Message Index
[*] Previous page
Go to full version