#558 ✓resolved

Form module email field

Reported by Imran | March 5th, 2012 @ 05:22 PM | in 2.0.6 (closed)

Create a form and add a text field with the identifier 'email'. Make the form's settings email the submission to a certain user. Try submitting the form, it will use the 'email' field as the from address to send the email and you'll get a whole bunch of errors if you enable the DEV and SMTP_DEV variables. Basically the form's $_POST['email'] variable overrides the SMTP_FROMADDRESS variable. I'm not sure why this would be but it could be potentially dangerous.

Comments and changes to this ticket

  • dleffler

    dleffler March 6th, 2012 @ 01:03 PM

    • Tag set to form module, mailing
    • Assigned user cleared.

    Actually this is a 'feature' which allows you to create a form which when the email is sent, sets up for a reply email to the sending address ('email' field) and sending name ('name' field) and also fills out the email header correctly. If you don't want to have it do this, set the field name to something like e-mail, etc...

    I'll look into the warnings, but the migrated 'contact form' takes advantage of this feature.

  • Imran

    Imran March 6th, 2012 @ 03:04 PM

    • Assigned user set to “expNinja”

    I see, then note that if the field is optional and you leave it blank, said errors occur.

  • dleffler

    dleffler March 6th, 2012 @ 03:26 PM

    • State changed from “new” to “open”
    • Assigned user changed from “expNinja” to “dleffler”
    • Milestone set to 2.0.6
    • Milestone order changed from “83” to “0”

    Ok, I'll change the code to not expect it to be filled, in which case, it'll default (eventually) to the SMTP_FROMADDRESS for users which aren't logged in (or if logged in use their profile address.

  • dleffler

    dleffler March 15th, 2012 @ 01:37 AM

    • State changed from “open” to “resolved”

    We now validate the email entry as an email address before using it.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket