HTML in Register_User?

Hello!

I am trying to work out how to send a HTML (email ready) template using the standard regisiter_user plugin. I know I need to change the mime type, but have no clue how!

I would assume that someone must have needed that and got it working...

Otherwise, is there a mail chimp or campaign monitor plugin to get emails and subscriptions done that way?

Thanks!

Comments

  • The Zenphoto mail handlers are not setup to provide a mime type, so you would have to modify the core files to do this and of course it would impact all mails sent by Zenphoto.

    How you do it depends on what mail handler you are using. PHP send_mail sets the mime type as part of the headers. See http://php.net/manual/en/function.mail.php

    PHP mail uses the mail object `isHTML()` method.
  • acrylian Administrator, Developer
    Otherwise, is there a mail chimp or campaign monitor plugin to get emails and subscriptions done that way?
    You find all extensions etc known to us on the extensions page. In short, no plugins for those known.
  • I think I have successfully added the Mime to the Php sendmail extension, however I am unsure where in register_user extention I prevent the HTML code from being messed with...

    Where does the content get processed in the options panel code? I can't find it...
  • Option post processing is handled at the front end of the admin-options.php script. Generally there is a sanitation of options which removes not-allowed HTML tags. What is allowed is controlled by the `allowed tags` option.
  • I see that now :) Is there any way I can remove this sanitation in the extension file or do I have to add all of the html tags for everything in the general settings tab?

    If the former is the only option, i'm not quite sure the format of the tag entering system, could you shed some light please?
  • I reset the setting to defaults, that makes a bit more sense now, but adding all of these extra <html> etc. tags is quite a dangerous security risk and I would rather just allow them for this plugin only... Any chance of this?
  • Delving into the functions-common.php file, I find different levels of sanitation... How can I set the sanitation level to 0? :)
  • Getting closer, just need to work out where the input is actually put through the sanitize function. Where is it?!?!? :)
  • EDIT: I'm stuck here, going round and round in circles! I can't find where the code that processes plugin option saves for the plugins tab is!
  • I am afraid you are not likely to make this work successfully. Plugin options are handled by a common "custom" option handler, so any change you make will be applied to ALL similar theme/plugin options.

    As you note, adding these tags can lead to security issues.

    Maybe your best approach would be to replace the register user plugin with one of your own making which uses a constant string for the message rather than an option.
Sign In or Register to comment.