I have an account with the Tor-based e-mail provider Mail2Tor. Their hidden service has been down lately; therefore I cannot access my e-mail account either to send or receive e-mail. I have been attempting to write a Perl script designed to connect to the mail server (hidden service) so I can send mail. There are two main problems with my configuration: one, I cannot connect it to the mail hidden service, and two, the instructions I read for creation of a mail client was actually for a locally hosted one, not a remote one.
The original code: #!/usr/bin/perl use LWP::UserAgent; use LWP::Protocol::Socks; my $url= ""; #your url here my $ua = new LWP::UserAgent(agent => 'perl'); $ua -> proxy([qw(http https)] => 'socks://127.0.0.1:9050'); print "To:\n"; $to=<STDIN>; $from='';#your email here print "Subject:\n"; $subject=<STDIN>; print "Body:\n"; $message=<STDIN>; open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; print MAIL $message; close(MAIL); print "Email Sent!"; exit;
If anyone can help me solve these two problems, I would be quite grateful.