View Full Version : How change email FROM
iamboard
07-10-2008, 12:42 PM
It appears that VB uses the Forum Name as the FROM in all automatically generated emails that are sent for such emails as welcome emails, confirmation emails, birthday emails, subscribe to thread emails, etc.
I would like to use something different than what is entered as my FORUM NAME as my email FROM. How do I change this.
Thanks
noppid
07-10-2008, 01:13 PM
Because the headers are a long string that is built and not an array and with all the possible From's there can be, it's not as easy as we would want.
But something quick and dirty on the mail_send hook could be...
$newmailfromname = "The Mailman";
$headers = str_replace("From: $mailfromname <$from>", "From: $newmailfromname <$from>",$headers);
If all three email contacts you can set in vBulletin are the same, that should work. If users can send each other mail, you may need to check if $username is set and not do the replace.
iamboard
07-10-2008, 08:02 PM
I also found this...
https://vborg.vbsupport.ru/showthread.php?t=129017&highlight=Email+from
Will that work?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.