TinyPortal

Development => Support => Topic started by: superQ on March 26, 2006, 07:21:42 PM

Title: anonymous email from php block
Post by: superQ on March 26, 2006, 07:21:42 PM
Is there a way to use this script from tp to send anonymous email that does not use the default email client of the sender. I want people[who I grant permission to] to be able to send anonymous email to public officials without fear of retaliation.


It may not be the best idea I ever had but I was just wondering if it was possible. If It is and I would have to grant permission first I may want to do it.It would not be used maliciously or very often and only for a select few.

If it is possible could the username and password be the same as the forum users login info.

Thanks

code is on this page


http://email.about.com/od/emailprogrammingtips/qt/et073006.htm
 
Title: Re: anonymous email from php block
Post by: gerrymo on March 26, 2006, 08:24:57 PM
Way too open to abuse from Trolls and Spammers. No way I'd allow such a thing on my server. In fact, I'd actively block it from being used.
Title: Re: anonymous email from php block
Post by: IchBin on March 26, 2006, 09:04:21 PM
Gerry, did you not see the part about him only giving it to a select few? He's also asking how to pull in the username. I don't see how he is opening it to the Trolls or spammers.

To answer your question I think it can be done. Pull in the user names with something like $context['user'] or something like that. I'd have to fiddle with it to be sure. But I think it's possible.
Title: Re: anonymous email from php block
Post by: superQ on March 26, 2006, 09:09:59 PM
I said it is not the best idea I ever had :uglystupid2:. I did say I wanted to enable it by permission only too, but it is a bad idea I know. :idiot2:

My second thought was for me to send an email from the forum to a public official saying something they may be interested in has been posted on the rockpile and a link to the post or article. I doubt they will be registering for my forum,and they would have to subscribe to the thread in order to be notified.

If I put the links on a seperate page and only I had access to that page would it be possible to send the email anonymously from the site and not my main account. I would list all the emails and just click on it and an email saying check this out etc. would be delivered.

Of course I would make it clear very early on that this is not spam and should not be blocked.

I guess I could set up an account for all the local politicians and include their  email and add them to the notify me of replies list so they get an email. Is that ok you think. I ####ing doubt it,although all these email addresses are public and I am paying for it so I don't really see why not.

I am not talking about persoal email addresses.Public only :coolsmiley:

I basically just want to send it from the forum and not my computer.

Just saw IB checking in.

I could live with me being the only one who could do it.

I had one script installed and it worked but I think it sent an email everytime I opened the page or uncollapsed the block. Here is that one.

  <?php
$to = "recipient@example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
  echo("<p>Message successfully sent!</p>");
} else {
  echo("<p>Message delivery failed...</p>");
}
?>