User Control Panel
Advertisements

HELP US, HELP YOU!

Can i do this?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Bot Depot Forum Index -> Ideas
View unanswered posts
Author Message
mathieu2005
Young One
Young One


Joined: 23 Dec 2004
Posts: 76

Reputation: 18.4Reputation: 18.4

PostPosted: Sat Mar 12, 2005 3:00 am    Post subject: Reply with quote

Hey all,

i just have a idea that is like

sending mail in the convo like
Code:
if ($msg =~/^!sendmail (.*) - (.*) - (.*) - (.*)/){<br />$1 = email of the sender<br />$2 = password of the sender<br />$3 = the subject<br />$4 = The message

But i dont know if i can.
Is nice to see you answer me (thx before).

Bye
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Sat Mar 12, 2005 3:19 am    Post subject: Reply with quote

Use Mail::Sendmail for this, it's really easy. Like this:

Code:
use Mail::Sendmail;<br />my($to,$message,$subject)=($1,$2,$3);<br /> my %mail = ( To      => $to,<br />            From    => $username,<br />            Message => $message,<br />            Subject => $subject,<br />            SMTP => 'mail.tcsbot.com:26',<br />           );<br /><br />  sendmail(%mail);<br />$self->sendMessage("OK. Send fine");


I havnt made it into a command, so you'll have to work that out yourself. Razz
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Sat Mar 12, 2005 4:08 am    Post subject: Reply with quote

if you meant bot-mail sorta thing, someone wrote a command ages ago.

search!
Back to top
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Sat Mar 12, 2005 8:00 am    Post subject: Reply with quote

Isn't there a SendMail Module Wink
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Sat Mar 12, 2005 8:58 am    Post subject: Reply with quote

Quote:
Isn't there a SendMail Module


Hmm, guess you didn't bother to look at TCS's code. Wink
Back to top
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Sat Mar 12, 2005 9:30 am    Post subject: Reply with quote

:\ sorry,

Didn't think before I posted. Sad
Back to top
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Sat Mar 12, 2005 12:08 pm    Post subject: Reply with quote

Is there a hotmail or another more public server?
Back to top
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Sat Mar 12, 2005 12:57 pm    Post subject: Reply with quote

Hotmail's server:

http://services.msn.com/svcs/hotmail/httpmail.asp

EDIT: Pasted correct URL
Back to top
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Sat Mar 12, 2005 2:42 pm    Post subject: Reply with quote

Hmm, i dont think thats valid in this command

Code:
connect to localhost failed (Unknown error) no (more) retries!
Back to top
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Sat Mar 12, 2005 3:02 pm    Post subject: Reply with quote

Hrrm, Not sure why then. ;\
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Sat Mar 12, 2005 6:32 pm    Post subject: Reply with quote

QUOTE(Dazzy @ Mar 12 2005, 09:42 AM)
Hmm, i dont think thats valid in this command

Code:
connect to localhost failed (Unknown error) no (more) retries!

[right][snapback]46812[/snapback][/right]


Did you specify the SMTP server? (it's "Smtp", not "SMTP", TCS Razz ).

$mail{Smtp} = 'mail.mydomain.com';

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Sat Mar 12, 2005 6:46 pm    Post subject: Reply with quote

Code:
<br />use Mail::Sendmail;<br />sub email {<br />    my ($bot,$self, $user, $name, $msg, $color) = @_;<br /><br />   my ($to,$message,$subject) = split("/",$msg,3);<br /><br />   if(!defined $message || !defined $subject || $to !~ /\@/ && $to !~ /\./){<br />  return "[Error]Wrong format...Like this:\n!email <to>/<message>/<subject>";<br />   }<br />   else{<br />  $message .= "\n\n->This email message was sent via the evolution template!";<br /><br />   my %mail = ( To      => $to,<br />            From    => $user,<br />            Message => $message,<br />           Subject => "Email from Evolution : $subject",<br />          Smtp => 'http://services.msn.com/svcs/hotmail/httpmail.asp',<br />          );<br />  sendmail(%mail);<br />  return "Ok, I've send the email...They should be recieving it any time now:)";<br />   <br />   }<br />}<br />


Yet i still get the same error and the email doesnt come Wink
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Sat Mar 12, 2005 7:42 pm    Post subject: Reply with quote

You should check for Sendmail errors:

Code:
my $success = Mail::Sendmail::sendmail(%mail);<br />if( !$success )<br />{<br />    print "Error: " . $Mail::Sendmail::error );<br />}
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Sun Mar 13, 2005 4:19 am    Post subject: Reply with quote

Hotmail isn't SMPT.

It uses HTTP-mail.
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Mon Mar 14, 2005 1:15 am    Post subject: Reply with quote

QUOTE(Dazzy @ Mar 12 2005, 01:46 PM)
Yet i still get the same error and the email doesnt come Wink
[right][snapback]46820[/snapback][/right]


Something you should note, if the SMTP server is invalid it will assume localhost. If the SMTP server IS valid, it will try twice with it and then try a few times with localhost, i.e.

Quote:
connect to aichaos.com failed (Unknown error)
connect to aichaos.com failed
connect to aichaos.com failed (Unknown error) no (more) retries
connect to localhost failed (Unknown error)
connect to localhost failed
connect to localhost failed (Unknown error) no (more) retries


I think it makes one more try at localhost than it does at the SMTP, but that's what the error kinda looks like if you actually have a valid SMTP server.

If you run your bot from your own computer, why not run a local SMTP server?

http://www.softstack.com/freesmtp.html

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Ideas All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group