vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Howto: Enable SMTP for vB 3.0.2/3 (https://vborg.vbsupport.ru/showthread.php?t=67294)

hasan2k 12-24-2004 03:34 AM

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.

HuangA 01-10-2005 04:00 AM

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?)....

BlazeXXX 01-22-2005 09:33 PM

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?

zaon 02-08-2005 01:17 AM

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?

Zachery 02-08-2005 10:40 AM

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.

zaon 02-11-2005 08:39 AM

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

btappan 02-14-2005 12:28 PM

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?

zaon 02-17-2005 08:55 AM

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?

ALcorn 02-17-2005 09:19 AM

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.

zaon 02-17-2005 01:03 PM

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! :-)


All times are GMT. The time now is 01:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01234 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete