Closed (fixed)
Project:
Mailhandler
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Nov 2010 at 01:17 UTC
Updated:
3 Jan 2014 at 02:41 UTC
Jump to comment: Most recent
Comments
Comment #1
itserich commentedThis is the error message I am getting from the Devel module when the Rule is invoked:
63.232 ms Action execution: "Create a user"
64.373 ms No appropriate mail address. No user has been created.
Is there a way to get the sending email address and use it as a sort of token to create an email address?
Need something to create a user name also. I used node id token.
Comment #2
summit commentedSubscribing, needing same functionality,
greetings, Martijn
Comment #3
end user commentedThis looks like exactly what I was looking for when creating new users from external scripts like shopping carts.
Comment #4
cor3huis commentedIDEA: If Rules and actions etc. do not work one could create a module from the Listhandler and only use the code that creates a users. Or modify listhandler in such a way that there is a new option e.g. only create user.
Comment #5
ilo commentedGuys, this for me looks like a good document about how to acomplish it. @itserich, you are the one closer to a solution, can you provide detailed steps to how reach that situation? it is very dificult to provide support to something like this considering the ammout of options and modules (or flows) involved, things don't come up to mind just reading two log lines ;)
Comment #6
jdotti commentedSubscribe
JD
Comment #7
itserich commentedI did not figure this out, and have not needed it so stopped trying.
This is the Rules module: http://drupal.org/project/rules
It allows automatic response to a variety of situations, and is about as useful as Views, Panels, and a few other key modules.
Login One Time may also help: http://drupal.org/node/1037956
Comment #8
kbasarab commentedsubscribe
Comment #9
Encarte commentedThis would be possible with Rules, but...
Rules needs an email and a login name in order to create a new user account, so the node created by Mailhandler must provide this information. You can get that information into CCK fields which Rules can use, but you need to have this issue fixed first: #1394216: More mapping sources for IMAP headers. With that fixed, it would be very simple.
Comment #10
danepowell commentedNeat idea, let me know if you need any help.
Another option would be to write a Mailhandler authentication plugin that creates a user account if one doesn't already exist for an email address. The benefit of this is that the node author would get assigned the new user account at creation time, and no extra CCK fields would be necessary (not sure if Rules can set the node author to be the new user account).
Comment #11
Encarte commentedAs to #1394216: More mapping sources for IMAP headers, I'm not a developer, Dane, so, unfortunately, I'm the one who wont be able to help. All I can do is test how the code behaves with Rules and write a how-to afterwords.
Rules can indeed set the node author to be the new user account (just as long as you have Token module), but the other option you describe (writing a Mailhandler authentication plugin) sounds more promising in what concerns performance. Rules can be quite heavy and demanding, and if you have a cron run throwing 10, 20 or more nodes into a user creation rule, you better have a good VPS or dedicated server, because a simple hosting or even a basic VPS probably isn't going to cut it.
In addition, the Mailhandler plugin option would be more site builder friendly, since it wouldn't require Rules and Token, let alone having to know how to build the rule (which seems to be complicated enough to actually be the issue here). That option would make Mailhandler self-sufficient.
Comment #12
eloivaquemy option
Edit this file sites/all/modules/contrib/mailhandler/plugins/authenticate_plugin/MailhandlerAuthenticateDefault.class.php
Comment #13
danepowell commentedFYI, in 6.x-2.5, you can now map the name and email address of a sender separately. Don't know if that helps or not.
Comment #14
danepowell commentedLooks like you figured something out. I still think the best solution to this would be to write a custom authentication plugin. Failing that, you could also store the sender name and email address in hidden fields on the created node, then use Rules to create an account based on those fields. But the node will still belong to the anonymous user.