Oleg, thank you so much for the PrivateMsg module. Awesome!

Questions

1) - Is their a way to allow Anonymous users / visitors to access the Send Private Message functionality?

2) - Is there any alternative to allowing not-logged-in anonymous visitors to send messages to user profiles. I understand the spam issue and would use Mollon to prevent some. I have browsed around Drupal.org and beyond without luck and it looks like folks are considering adding the permission to Personal Contact form ... under code freeze from what I understand.

[Only 2-months of Drupal (D6) under my belt, newbie, and no coding skills, building a community-centric celebrity agent site and looking for ways to allow fans to send private messages to their favorite stars, ie user profiles.]

Thank you so much for your help; fully appreciated.

-arnaud

Comments

berdir’s picture

Well, the thing is that it does not make much sense, because there is no way to anser such a message.

While we have already thought about this, it would currently not work, so we have explicitly disabled privatemsg for anon users.

arnaudfischer’s picture

Thank you for the responsiveness; fully appreciated. Even with a "From" field? Beside, being able "to answer such a message" does not necessarily have to be a requirement depending on the application/context, say ... fans (un-authenticated anonymous users) that would want to sent a private messages to a celebrity profile (authenticated user profile). The value of i) keeping private and ii) mgt side for the celebrity is realistic and certainly would apply to other implementations as well. maybe I am missing some more fundamental spam/security issues?

berdir’s picture

Currently, we do not support it technically, so we disabled it. While I understand what you mean, I think the use case is really limited, because it is a one-way communication only, even if the celebrity wants to do so, she/he can't answer. Atleast not inside your website.

For now, I would suggest to add what I've written in another issue: A link "Register to write a message" which links to the register form and then forwards to the message sending form. This does have other advantages, for example, a celibrity can block someone who is spamming here.

berdir’s picture

Version: 6.x-1.0-rc3 »
Category: support » feature

Setting the correct category, this is a new feature, not a support request.

R-Man’s picture

Component: User interface » Code

I hope there will be an Anonymous Privatemsg soon. I need it for my upcoming project. Anyone knows where and how i can edit the Privatemsg module for this purpose?

Thanx in advance.

==================

Radin@R-Man
Webmaster/Founder
SFOGSzeRo.com

weeksan’s picture

I can see the argument, but what's great is that this tool allows a way for users to really connect with other users on the site, especially wihout having to create tons of webforms, and manually setting up links, which then link to the contact forms, and blah blah blah.

What would be an AMAZING feature is if an anon user were to click the send private message (this is clearly the better way to go in order to allow privacy and help hide personal email addresses instead of just using a mailto: link) is if when the anon user clicks send private message instead of going to the general private message creation, it generates sort of a webform which is turn means the anon user has to fill out their email and name and then the message and it'll be sent. If someone wishes to respond at that point they go just go into their email and put in buddy's address and write a response, from which email they wish.

berdir’s picture

Status: Active » Closed (duplicate)

#490264: New sub-module: Site-wide contact form allows to replace contact.module with a privatemsg-based solution. It is however currently limited to the site contact feature of the contact module and only allows to write to a specific, hardcoded recipient list.

I think it could be extended to optionally expose a contact tab just like contact.module, but only for anonymous users.

I am therefore closing this issue as a duplicate of that one and suggest everyone interested in this to follow-up there. Feel free to contact me directly if you want to sponsor that feature, I'm not really interested myself and will only implement it when I find the time and interest to do so.

hgroover’s picture

Version: » 7.x-2.x-dev

Another alternative is to write a little php code and use the API to send a message.
I have a site on economy hosting (godaddy) with email delivery times of 30-90 minutes for outgoing emails, so I use this for debugging new site features.

To add php code, you need to enable the php content filter. It's recommended you do this only for admin content creators. You also need to be aware of placing a call to this API in any place where someone could abuse it, but since you're sending to only a single recipient the worst case should be that you flood your own privatemsg inbox.

Assuming you want to send to user 1 (usually the admin user) do something like this:

$msg = "Hello there";
$source_tag = "from {$_SERVER['REMOTE_ADDR']}";
$result = privatemsg_new_thread( array(user_load(1)), "Browser visit {$source_tag}", $msg, array('author' => user_load(1)) );
// If you wanted to show an error, uncomment the following:
if (!isset( $result['success'] ) || !$result['success'])
{
  printf( "<p>Failed to send: %s</p>\n", $result['error'] );
}

Note that I've also explicitly loaded the sender, since you can't send from anonymous.