From Name When Sending Email
Permalink
I have made an package that sends out some emails. However, I need to be able to specify from whom an email is sent from, in addition to the email address. In the current setup, I'm only able to put in the email address.
E.g. JACOB (jacob@jacob.com). JACOB is the "from" in addition to the email jacob@jacob.com.
It's probably a change in the following code, which sends out the email, but don't know how... It can be hardcoded - do C5 have this option?
$mess = Config::get('acbody');
$find = array('[navn]', '[tid]');
$rep = array($user->getAttribute('name'), $aci);
$rdy_mess = str_replace($find, $rep, $mess);
$mh = Loader::helper('mail');
$mh->setSubject(Config::get('actopic'));
$mh->setBody($rdy_mess);
$mh->to($user->uEmail, $user->uName);
$mh->from(Config::get('acemail'));
$mh->sendMail();
Kind regards
Jacob
E.g. JACOB (jacob@jacob.com). JACOB is the "from" in addition to the email jacob@jacob.com.
It's probably a change in the following code, which sends out the email, but don't know how... It can be hardcoded - do C5 have this option?
$mess = Config::get('acbody');
$find = array('[navn]', '[tid]');
$rep = array($user->getAttribute('name'), $aci);
$rdy_mess = str_replace($find, $rep, $mess);
$mh = Loader::helper('mail');
$mh->setSubject(Config::get('actopic'));
$mh->setBody($rdy_mess);
$mh->to($user->uEmail, $user->uName);
$mh->from(Config::get('acemail'));
$mh->sendMail();
Kind regards
Jacob
Is this not a solution for you?
http://www.concrete5.org/documentation/how-tos/editors/set-site-ema...