Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Howto: Enable SMTP for vB 3.0.2/3
Zachery's Avatar
Zachery
Join Date: Jul 2002
Posts: 11,440

 

Ontario, Canada
Show Printable Version Email this Page Subscription
Zachery Zachery is offline 07-16-2004, 10:00 PM

I am putting this in here once it has been confirmed working ill ask it to be moved.

I offer no support, enabling SMTP will be considered hacking, thus why it is here.

Thanks to Chris on the vB team for the help :0
Attached Files
File Type: txt smtp.txt (691 Bytes, 697 views)
Reply With Quote
  #62  
Old 12-24-2004, 03:34 AM
hasan2k hasan2k is offline
 
Join Date: Jan 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Illuvatar
Sorry for stepping out of bounds. *Considers his hands properly slapped*
With the help from the above person, I got my smtp to send emails. user "nobody" is not allowed to send emails.

I somehow got it to work but i had to change some setting in my server.(smtp setting)

In the server WHM, I did this:

Server Setup > Security Tweaks > The SMTP Tweak is disabled

Without this the emails were not working and I was getting all kind of errors. Now my smtp is kind of insecure. php doesnt send email as "nobody" now cause I disabled in WHM. But I dont know how to have the smtp check for users id before letting them use smtp to send emails.

Can someone give me some pointers ? I want to be able to have the smtp check for userid/password before they allow someone to send email. Now anyone can i believe.
Reply With Quote
  #63  
Old 01-10-2005, 04:00 AM
HuangA's Avatar
HuangA HuangA is offline
 
Join Date: Jun 2004
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Zach, can I please request something similar to Illuvatar's fixed attachement to be posted on the first page entry as well? It took me a good 30 minutes of hair ripping before I finally noticed his little attachement and applied for it to get my vb to work... Now that I'm missing like half of my hair, I'd like to keep the other half next time I need to apply this (maybe the next major release?)....
Reply With Quote
  #64  
Old 01-22-2005, 09:33 PM
BlazeXXX BlazeXXX is offline
 
Join Date: May 2004
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I am not wrong, to be able to send mails through SMTP, first you need to verify your self with user id and password. Thats why this hack needs ur logins to connect. "Nobody" is simply using php mail function to send mail.. so I don't think your SMTP is insecure.

I think you could edit the settings if u still fear in SMTP conf file.

I could not get it to work . I haven't tried the second attachment which Illuvator gave. I tried it, but did not work.. so i am trying what Zach gave.

Getting this error:
Fatal error: Call to undefined function: errormessage() in /home/torrents/public_html/includes/mail.php on line 235

at Line 235:
if (!$this->sendMessage(".", 250))
{
return errorMessage("Unexpected response from SMTP server");


I got that code. However, I disabled SMTP tweak, also checked my server doesnt allow to send mails as "NoBody".


EDIT:

I could send mail to single user through diagnose tools, but when I send mass mails I am getting this error:

Fatal error: Call to undefined function: errormessage() in /home/torrents/public_html/includes/mail.php on line 218

The line I got in mail.php at 213 - 219 are:
if (!$this->sendMessage(base64_encode($this->smtpUser), 334) OR !$this->sendMessage(base64_encode($this->smtpPass), 235))

{

return errorMessage("Authorization to the SMTP server failed");

}

It can't be wrong password, because it is able to send mail to a single user. It sent to one person in mass mail list, it only occured for second > user.


Any idea how to overcome it?
Reply With Quote
  #65  
Old 02-08-2005, 01:17 AM
zaon zaon is offline
 
Join Date: Jul 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm on vBulletin 3.0.1 at the moment, but don't see a mail.php file anywhere, much less in the includes directory. I really need to use SMTP to send mail via gmail.com instead of from forums server directly (for reverse lookup reasons/blocking/etc). Is this code found in some other includes file in 3.0.1 versus 3.0.2+? I wouldnt' think any major structural changes to vbulletin would exist between security releases. What do I do?
Reply With Quote
  #66  
Old 02-08-2005, 10:40 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zaon
I'm on vBulletin 3.0.1 at the moment, but don't see a mail.php file anywhere, much less in the includes directory. I really need to use SMTP to send mail via gmail.com instead of from forums server directly (for reverse lookup reasons/blocking/etc). Is this code found in some other includes file in 3.0.1 versus 3.0.2+? I wouldnt' think any major structural changes to vbulletin would exist between security releases. What do I do?
NOTE THE TOPIC OF THE THREAD


howto enable smtp for vBulletin 3.0.2 and 3.0.3 It also works on all versions there after.
Reply With Quote
  #67  
Old 02-11-2005, 08:39 AM
zaon zaon is offline
 
Join Date: Jul 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Zachery.

I'll go ahead and renew my maintenance agreement so I can upgrade to latest ver of vbulletin.

One more question tho:

My gmail SMTP server requires some additional settings I want to ensure this forum fix will accommodate:

1) outgoing SMTP server requires authentication (using same settings as incoming POP)
2) outgoing SMTP server port requires SSL encryption (port number 465)

Either of those pose a problem with this install? I can see in your code where you enter your port number, so maybe that automatically enables SSL. But where do you switch on outgoing authentication?

Appreciate your patience with me. Thanks.

--Justin
Reply With Quote
  #68  
Old 02-14-2005, 12:28 PM
btappan's Avatar
btappan btappan is offline
 
Join Date: May 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has any got this working using Illuvatar's rendition? When I used just Zacherys instructions, it sends emails, but some get bounced even when their good valid addresses. I tried using Illuvatar's fix but get all kinds of errors. part of it is that his instruction have a piece of code repeated twice in them.

PHP Code:
        $mailObj = new SmtpMail($toemail$subject$message$header$vboptions['webmasteremail'], (boolean)$vboptions['needfromemail']);
    }
    else
    {
        
$mailObj = new Mail($toemail$subject$message$header$vboptions['webmasteremail'], (boolean)$vboptions['needfromemail']);
    }    
    return 
$mailObj->success;

this section ends up in functions.php twice if you just copy in past from his .txt file. who has this working?
Reply With Quote
  #69  
Old 02-17-2005, 08:55 AM
zaon zaon is offline
 
Join Date: Jul 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm.. if no one is able to answer my question two posts up, maybe someone can state whether or not they're able to use this SMTP send function with web-based real email like gmail, hotmail, yahoo, etc., which offer POP/SMTP access to those accounts?
Reply With Quote
  #70  
Old 02-17-2005, 09:19 AM
ALcorn ALcorn is offline
 
Join Date: Oct 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zaon
But where do you switch on outgoing authentication?
Outgoing authentification is set just by filling the following parameters
$smtpUser = user@domain.com;
$smtpPass = password;

But I think there will be a problem with SSL.
Reply With Quote
  #71  
Old 02-17-2005, 01:03 PM
zaon zaon is offline
 
Join Date: Jul 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, ALcorn :-)

Also, I rechecked and google mail does indeed require TSL/SSL for outgoing SMTP connections and there's no way around that.

Google tells me this shouldn't be a problem because ALL current mail clients in the world, no matter how obscure, have a setting for TSL (sometimes called 'SSL') for both incoming and outgoing mail sending. So, there must be a way for our Linux/PHP server to send that way, right?

Or, is this SMTP function proprietary to vbulletin, being Jelsoft's hand-made mail-sending code that bypasses normal protocol and only contains the capabilities Jelsoft's programmers have chosen to include?

Thanks for any clarification y'all can offer! :-)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:54 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04645 seconds
  • Memory Usage 2,335KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete