just in case anyone else googles this anytime i chose the former
approach

so i need to change that attribute after the form is posted, cos until
then we don't have the users email address.

inside get_message_dict, line before returning message_dict

message_dict['from_email'] = self.request.POST['email']


On Mar 18, 1:17 pm, Tom Evans <tevans...@googlemail.com> wrote:
> On Fri, Mar 18, 2011 at 11:07 AM, shofty <m...@shofty.me> wrote:
> > has anyone got any code to share on how to make the email appear to be
> > from the person who is submitting the form.
>
> > you'd think it'd be simple, but i cant work out how to do it.
>
> It is simple:
>
> https://bitbucket.org/ubernostrum/django-contact-form/src/1d3791fa4df...
>
> This is where the from email address is configured. If you want to
> override this, you can either monkey patch that attribute after form
> construction or (cleaner) sub-class the form and override that
> attribute.
>
> Cheers
>
> Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to