In system emails, e.g. mails to classifieds buyer/seller, the from field is pulled from the site title.
Is there a way to make it put a custom 'from' into the mails?
E.G. BxDolClassifieds.php
function ActionBuySendMailAdvertisement($iAdvertisementID) { global $site; $iSellerId = (int)$_REQUEST['IDSeller']; $iMemberID = (int)$_COOKIE['memberID']; $sRetHtml = _t('_WARNING'); if ($iMemberID > 0 /*AND $iMemberID != $nameRet['ID']*/ ) { $aSqlResStr = $this -> GetAdvertisementData($iAdvertisementID); $aSqlSellerRes = $this -> GetProfileData($iSellerId); $aSqlMemberRes = $this -> GetProfileData($iMemberID); if ($aSqlResStr) { $sCustDetails = ($aSqlResStr['CustomFieldName1'] != NULL AND $aSqlResStr['CustomFieldValue1'])?"{$aSqlResStr['Unit']} {$aSqlResStr['CustomFieldValue1']}":''; $sCustDetails .= ($aSqlResStr['CustomFieldName2'] != NULL AND $aSqlResStr['CustomFieldValue2'])?" - {$aSqlResStr['Unit']} {$aSqlResStr['CustomFieldValue2']}":'';
$sCopyright = _t('_copyright', 2007); $sBottom = _t('_bottom_text', 2007); $sPowDol = _t('_powered_by_Dolphin'); $sBuyMsg2 = _t('_CLS_BUYMSG_2'); $sBuyDet1 = _t('_CLS_BUY_DET1'); $sReturnBackC = _t('_Return Back');
// Send email notification $sMessageB = getParam( "t_BuyNow" ); $sMessageS = getParam( "t_BuyNowS" ); $sSubject = getParam('t_BuyNow_subject'); $sSubjectS = getParam('t_BuyNowS_subject');
Could I change that to 'global Admin;' (or whatever) rather than it putting the site title in there (which is kinda long)??
(I'm assuming that's the correct line) |
In default dolphin it uses the information provided during the install to send mails.
You can change that in the file inc/header.inc.php
---- |
I'm sorry, you seem to have misunderstood what I'm asking.
I've changed both the original email address to one that I want the emails to come from and I've changed the site title for SEO purposes.
When the system sends an email (e.g. confirmation link) it draws the site title as the 'From' and the site email as the 'from email'.
Email: From: <site title> (email@mydomain.com)
I'd prefer instead to have a custom 'from' field rather than it drawing the site title for that. My site title is about 76 characters long, so the system mails say all 76 characters in the from field, imo that's too long (but ideal for SEO reasons in the title). |
I think you are using your own custom mail function.
You can use the php mail() function for this.
mail($to,$sub,$mess,$extra);
in the extra you can use the from address with the site name. hope this helps.
---- |
what?
I'm not using a custom function, the site name is the title, the title is now 76 characters long; I don't want the title to show in the from field it is too long. I want to change it so that I AM using a custom from field and not the site title.
SEO is important if you want good SERPS, site title is important in SEO, period. All I want to do is not have the system send mails from the site title, but from a custom field.
Example 3!
lets say that the site title/site name (call it what you will) is "My new social networking website please join"
everytime the system sends an email it will come from "My new social networking website please join" (email@mydomain.com). Instead I want it to send from "new social network" (email@mydomain.com)
I don't know what is so difficult to understand? |
Ok, let me rephrase the question...
is there a way to change the PAGE title on the homepage that DOESN'T transfer that 'name' to the mails?
Every mail that comes from my site now has a 76 character from field, which is kind of stupid. I want my HOMEPAGE title to contain relevant keywords for SEO purposes NOT the emails that are sent by the site to users.
All of the emails take the 'From' field from the 'site title' that is found in header.inc.php which is also the title on the homepage..
/inc/header.inc.php ..... $site['title'] = 'yoursitetitle';
but that is the problem.. I want the homepage title different to the site title.. |
Have you tried editing the email templates? (Admin/settings/email templates. I hope this helps.
Stuart There are none so blind as those that will not see. |
It's nothing to do with the email templates stuart..
take a look at your homepage title bar, then look at any emails you get from your site..
the 'from' field reflects the title of your homepage so if you call your site 'Dolphin Love' your emails will come from 'Dolphin Love' (email@your.domain.com). If you call your site 'Dolphin Love Social Networking for Dolphins' then your emails will come from there instead...
it's annoying |
Ok, I see! interesting one...
It's nothing to do with the email templates stuart..
take a look at your homepage title bar, then look at any emails you get from your site..
the 'from' field reflects the title of your homepage so if you call your site 'Dolphin Love' your emails will come from 'Dolphin Love' (email@your.domain.com). If you call your site 'Dolphin Love Social Networking for Dolphins' then your emails will come from there instead...
it's annoying
There are none so blind as those that will not see. |