Author Topic: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)  (Read 77484 times)

0 Members and 1 Guest are viewing this topic.

joro_shulev

  • Jr. Member
  • **
  • Posts: 1
Re: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
« Reply #15 on: November 21, 2012, 05:35:47 PM »
Hi,

I'm able to set up everything, but i get the following message when I try to send e-mail (while chat function is offline)

SMTP Error: Could not connect to SMTP host.
Warning: Cannot modify header information - headers already sent by (output started at /home/content/86/9957186/html/proofable/chat/libs/mailer/class.phpmailer.php:586) in /home/content/86/9957186/html/proofable/chat/libs/common.php on line 413

Please help me to fix this.

Thanks a million times


dennis_braga

  • Jr. Member
  • **
  • Posts: 4
Re: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
« Reply #16 on: February 18, 2013, 05:05:58 PM »
(instructions for Mibew 1.6.3)

4. Edit common.php, find function webim_mail(), delete it or rename to webim_mail_old

...in my case, I found the function on notify.php!

breaker84i

  • Full Member
  • ***
  • Posts: 10
Re: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
« Reply #17 on: December 23, 2013, 07:46:43 AM »
guys what if my smtp doesn't required username dan password?
should i leave it blank?
i follow all but nothing happen, nothing error...
the mail was not sent..
regards
« Last Edit: December 26, 2013, 06:24:05 AM by breaker84i »

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 907
    • Mibew Messenger
Re: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
« Reply #18 on: December 25, 2013, 10:33:41 PM »
Hi there!  :)

Though I know nothing about this solution and its compatibility with the actual version of Mibew, I can make some suggestions.

One should know that starting from the version of 1.6.6 (AFAIR) the function for sending emails is not webim_mail anymore. Now it's called mibew_mail. So you should remove that function from the libs/notify.php file and change the name of the function webim_mail in the original code (the one attached to the starting post of this topic).

As for your question, maybe you should change the original code to simply remove the calls of setUsername and setPassword methods. (BTW, I really hope that you're not running an open relay:D )

And, of course, you should check all possible system logs for signs of any errors.

cbegg50

  • Jr. Member
  • **
  • Posts: 1
Re: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
« Reply #19 on: March 01, 2014, 09:55:43 PM »
Hi There,
  I have 1.6.9, but worked with the 1.6.4 modifications which all seemed to work find (using notify.php).  In the supplied maill.php, I changed all the webim instance to mibew and it almost works.  You assume that the mailbox username and the SMTP username are the same.  But my ISP keeps them different.  I simply edited line 43 in your supplied mail.php to:

     ->setUsername('MySMTPUsername')

Then that was it.

Nice fix for SMTP, thanks,
Colin Begg

wansim

  • Jr. Member
  • **
  • Posts: 2
Re: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
« Reply #20 on: April 16, 2015, 11:55:14 PM »
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 :)




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 [nofollow]">
<html xmlns="http://www.w3.org/1999/xhtml [nofollow]">
<head>
<title>Leave a Message</title>
<meta http-equiv="refresh" content="0; url=../message.php">
</head>

<body>

</body>
</html>

Then in the directory before /webim/, just put a file called "message.php", and set it up to send a message to you there.

crackeclypse

  • Jr. Member
  • **
  • Posts: 1
Re: Mail 1.6.3: Setting up mail through SMTP (using swiftmailer)
« Reply #21 on: June 09, 2015, 07:20:52 PM »
Thanks This works perfectly