Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-25-2006, 06:57 AM
64North 64North is offline
 
Join Date: Jun 2006
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vb 3.6.x - how to change welcome email sender?

I am tinkering with 3.6.x in the pre-launch stage of my new forum, and I can't seem to figure out where to change the sender info of the confirmation emails and any other email sent by the board.

Right now it seems to use the board title variable, but I don't want that as it looks rather silly:

From: "Outdoor Digital Photo Online - Digital Photography of the Great Outdoors! at Outdoor Photo Net \(OPN\)" <actual email address here>

Which template do I have to change to remove the title and just use something I will hardcode into that template?

Thanks in advance for your time and consideration.
Reply With Quote
  #2  
Old 06-25-2006, 07:26 AM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Search for the phrase welcomemail you should then find a phrase that looks like "Welcome to $vboptions[bbtitle]!" Then you can just edit it to "Welcome to Our Forums" or whatever you want.
Reply With Quote
  #3  
Old 06-25-2006, 08:26 AM
64North 64North is offline
 
Join Date: Jun 2006
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

rogersnm, thanks for your quick reply, but that's not it.
There is nothing wrong with the welcome email subject or body. It's the sender that's screwed up. Let's assume you send me an email from your regular email account, the sender will show up as "Nick Rogers" <whatever@yourisp.com>. That's all good, except for me the sender is $vboptions[bbtitle], which makes it "Outdoor Digital Photo Online - Digital Photography of the Great Outdoors! at Outdoor Photo Net \(OPN\)" <actual email address here>, which is not what I would like it to say. Let's assume I want to change "Outdoor Digital Photo Online - Digital Photography of the Great Outdoors! at Outdoor Photo Net \(OPN\)" <actual email address here> to "Nick Rogers" <whatever@yourisp.com>, where would I need to do that?
Reply With Quote
  #4  
Old 06-25-2006, 08:42 AM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so, lets get this straight. You have an email it syas it's from "Outdoor Digital Photo Online - Digital Photography of the Great Outdoors!" instead of "webmaster@outdoor-photo.net". From what i can see it's the subject you want changing. IT's currently set for "[bbtitle] <[email adress]>" where as you want it to be "[name] <[email adress]>". It looks like your using outlook which seems to have asigned the [bbtitle] as the name of that contact. I think it's just for you.
Reply With Quote
  #5  
Old 06-25-2006, 09:27 AM
64North 64North is offline
 
Join Date: Jun 2006
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using Eudora, but even if accessing the email through webmail the problem is the same, here is the email header:

Code:
Return-path: <email@domain.net>
Envelope-to: email@domain.net
Delivery-date: Sun, 25 Jun 2006 03:43:02 -0400
Received: from xxx by xxx.xxx.xxx with local (Exim 4.52)
     id 1FuPGo-0000WL-4v
     for email@domain.net; Sun, 25 Jun 2006 03:43:02 -0400
To: email@domain.net
Subject: New User at Outdoor Digital Photo Online - Digital Photography of the Great Outdoors at Outdoor Photo Net
From: "Outdoor Digital Photo Online - Digital Photography of the Great Outdoors at Outdoor Photo Net)" <email@domain.net>
Auto-Submitted: auto-generated
Message-ID: <200606250701.3deb9b712603@www.outdoor-photo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-Mailer: vBulletin Mail via PHP
Date: Sun, 25 Jun 2006 03:43:02 -0400
I replaced the actual email addresses with email@domain.net.

What I would like to achieve is that the From: line reads "Outdoor Photo Net" <email@domain.net>
Reply With Quote
  #6  
Old 06-25-2006, 05:49 PM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then change your board name.
Reply With Quote
  #7  
Old 06-25-2006, 06:18 PM
64North 64North is offline
 
Join Date: Jun 2006
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL
That's my whole point, I don't want to change the board name just to change the "FROM" line of the email, furthermore, I shouldn't have to.

The board name is what it is due to SEO considerations.
Clearly there must be code somewhere that determines what the FROM line of emails is supposed to be, whether that is part of a template or part of the actual vB code.

What I would like to find out where in the code there is a line that looks like
(pseudo) FROM = $vboptions[bbtitle], so that I can hardcode a different name in there.

Edit:
I looked at this myself, turns out that the relevant file is /includes/class_mail.php, will report back once I figured out how to change it. I found it by searching for "from" in all files and looking through those that look like they may have something to do with email.

Edit2: (automerge sucks, as this post is not flagged as new, even though there is now massivly new content )
Ok, in /includes/class_mail.php

FIND:
PHP Code:
$mailfromname construct_phrase($this->fetch_first_line($vbphrase['x_mailer']), $vbulletin->options['bbtitle']); 
REPLACE WITH:
PHP Code:
$mailfromname construct_phrase($this->fetch_first_line($vbphrase['x_mailer']), "Outdoor Photo Forum"); 
FIND:
PHP Code:
$mailfromname $vbulletin->options['bbtitle']; 
REPLACE WITH:
PHP Code:
$mailfromname "Outdoor Photo Forum"
FIND:
PHP Code:
$mailfromname "$username @ " $vbulletin->options['bbtitle']; 
REPLACE WITH:
PHP Code:
$mailfromname "$username @ " "Outdoor Photo Forum"
This will result your email header to change from:
Code:
Return-path: <email@domain.net>
Envelope-to: email@domain.net
Delivery-date: Mon, 26 Jun 2006 04:14:34 -0400
Received: from xxx by xxx.xxx.xxx with local (Exim 4.52)
        id 1FumEs-0003Hm-A1
        for email@domain.net; Mon, 26 Jun 2006 04:14:34 -0400
To: email@domain.net
Subject: Welcome to Outdoor Photo Net - Digital Photography and Digital Photo Online Resource!
From: "Outdoor Photo Net - Digital Photography and Digital Photo Online Resource" <email@domain.net>
Auto-Submitted: auto-generated
Message-ID: <200606260816.9a6b42347894@www.outdoor-photo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-Mailer: vBulletin Mail via PHP
Date: Mon, 26 Jun 2006 04:14:34 -0400
to:
Code:
Return-path: <email@domain.net>
Envelope-to: email@domain.net
Delivery-date: Mon, 26 Jun 2006 05:17:01 -0400
Received: from xxx by xxx.xxx.xxx with local (Exim 4.52)
        id 1FunDJ-000326-2S
        for email@domain.net; Mon, 26 Jun 2006 05:17:01 -0400
To: email@domain.net
Subject: Welcome to Outdoor Photo Net - Digital Photography and Digital Photo Online Resource!
From: "Outdoor Photo Forum" <email@domain.net>
Auto-Submitted: auto-generated
Message-ID: <200606260957.45748e183842@www.outdoor-photo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-Mailer: vBulletin Mail via PHP
Date: Mon, 26 Jun 2006 05:17:01 -0400
The curious part about the whole thing is that the FROM variable in class_mail.php line:
PHP Code:
function start($toemail$subject$message$from ''$uheaders ''$username ''
is supposed to be used to do just that. Meaning if I were to assing a string to $from right in that line of code, it should work, but I couldn't get it to actually work, no matter what I tried.

I am not sure what the problem is. Assigning a variable to $from should eliminate the need to do any of the replace edits I showed above.

I am unable to properly debug the whole thing. This is part of the original class_mail.php code
PHP Code:
$from $this->fetch_first_line($from);
        if (empty(
$from))
        {
            global 
$vbphrase;
            if (isset(
$vbphrase['x_mailer']))
            {
                
$mailfromname construct_phrase($this->fetch_first_line($vbphrase['x_mailer']), $vbulletin->options['bbtitle']);
            }
            else
            {
                
$mailfromname $vbulletin->options['bbtitle'];
            }

            if (
$unicode_decode == true)
            {
                
$mailfromname utf8_encode($mailfromname);
            }
            
$mailfromname $this->encode_email_header(unhtmlspecialchars($mailfromname$unicode_decode), $encoding);

            
$fromemail $vbulletin->options['webmasteremail'];
            
$headers .= "From: $mailfromname <" $vbulletin->options['webmasteremail'] . '>' $delimiter;
            
$headers .= 'Return-Path: ' $vbulletin->options['webmasteremail'] . $delimiter;
            
$headers .= 'Auto-Submitted: auto-generated' $delimiter;
        }
        else
        {
            if (
$username)
            {
                
$mailfromname "$username @ " $vbulletin->options['bbtitle'];
            }
            else
            {
                
$mailfromname $from;
            }

            if (
$unicode_decode == true)
            {
                
$mailfromname utf8_encode($mailfromname);
            }
            
$mailfromname $this->encode_email_header(unhtmlspecialchars($mailfromname$unicode_decode), $encoding);

            
$fromemail $from;
            
$headers .= "From: $mailfromname <$from>" $delimiter;
            
$headers .= 'Return-Path: ' $from $delimiter;
        } 
Makes me wonder whether the if (empty($from)) returns TRUE, even if a value is assigned to $from inline.

I just don't know enough about how this all works, but I tried both $from = 'Outdoor Photo Forum' and $from = "Outdoor Photo Forum", and both resulted in empty FROM lines in the email header, empty in such a sense that they looked like this "" <email@domain.net>

Well that's about it. It works the way I chose by replacing all the code as shown above. It would be nice to get it to work by just assigning a value to $from, but after I tried this for a while I grew tried and gave up since I do have a working solution.
Reply With Quote
  #8  
Old 06-26-2006, 08:34 AM
Sculli's Avatar
Sculli Sculli is offline
 
Join Date: Nov 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 64North
Edit2: (automerge sucks, as this post is not flagged as new, even though there is now massivly new content )
Bump for you.
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:17 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.04150 seconds
  • Memory Usage 2,274KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (8)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete