WBCE CMS – Way Better Content Editing.
You are not logged in.
Hallo!
Ich suche eine Möglichkeit, nicht nur die Reply-Adresse aus dem Form ins Mail zu übernehmen, sondern auch den Absender als eMail und wenn geht auch den Namen.
Hintergrund ist, dass man so Spammer viel leichter löschen kann. Geht das irgendwie?
Offline
If I understand correctly you want the form to be sent by (from field) any fake address that someone fills in the form?
I would not advise that.
If your spamfilter blocks these mails it is likely that the sender IP is reported to one or more blacklists, resulting your IP address to be blocked as spammer.
If you really want it you can add one line into view.php (untested!)
find the line:
// send message by mail
after that add a line
if($replyto) $emailfrom = $replyto;
Offline
ruebezahl
Thank you, this works.
But now there is a mixture of sender email and site-owner name: Siteowner<sender@email.com>, which is irritating.
How can I get the name from a field "name" as sender name: Frank Sender<sender@email.com>.
Offline
Miniform has no fields that will be there always. Any code change will therefore work on only one form!
With some effort you could create a variable from $_SESSION['form']['the_field_that_has_the_name'].
Something like (example is depending on the fieldname you used for the "Name"):
$sender_name = isset($_SESSION['form']['mf_r_name']) ? $_SESSION['form']['mf_r_name'] : WBMAILER_DEFAULT_SENDERNAME;
Next, just after the previous change the is the line with the call to the email routine.
In that line change WBMAILER_DEFAULT_SENDERNAME into $sender_name
// org
if($mf->mail ($emailfrom, $email, $subject, $emailmessage, WBMAILER_DEFAULT_SENDERNAME, $replyto)) {
// new
if($mf->mail ($emailfrom, $email, $subject, $emailmessage, $sender_name, $replyto)) {
Another (better/more simple) fix would be to change WBMAILER_DEFAULT_SENDERNAME into '' (empty string).
After that, no name will be used.
Remeber, after a future update these changes will be lost.
Offline
ruebezahl
Pages: 1