Death12652
2010-05-16 12:31:58
Is there a way for scar to email or something of that nature to the owner if something were to go wrong with a script? Like if it doesn't find a color or something?
2010-05-16 12:31:58
2010-05-16 12:35:52
From: death12652
Is there a way for scar to email or something of that nature to the owner if something were to go wrong with a script? Like if it doesn't find a color or something?
2010-05-16 13:15:51
2010-05-16 13:18:52
2010-05-16 13:54:52
function MailError(Error, Text: String): String;
var Page: Integer;
begin
Page := InitializeHTTPClient(False, False);
ClearPostData(Page);
AddPostVariable(Page, 'error', Error);
AddPostVariable(Page, 'text', Text);
Result := PostHTTPPageEx(Page, 'http://www.domain.com/mail.php');
FreeHTTPClient(Page);
end;and heres the PHP code:2010-05-16 13:55:12
2010-05-16 17:05:20
From: Frement
Heres SCAR code:and heres the PHP code:function MailError(Error, Text: String): String;
begin
Page := InitializeHTTPClient(False, False);
ClearPostData(Page);
AddPostVariable(Page, 'error', Error);
AddPostVariable(Page, 'text', Text);
Result := PostHTTPPageEx(Page, 'http://www.domain.com/mail.php');
end;
[PHP]<?php
$mail = "yourmail@domain.com";
$subject = "ERROR: " . $_POST["error"];
$message = $_POST["text"];
if (strlen($mail) > 1 && strlen($subject) > 7 && strlen($message) > 1) {
mail($mail, $subjet, $message);
echo "Success!";
} else {
echo "Failed!";
}
?>[/PHP]
2010-05-16 17:06:01
From: Zyt3x
Don't forget to free the HTTPClient! ;)
Also, Page doesn't exist in that function..
From: death12652
Frement Where do I post the php code? In MySQL.
2010-05-16 19:47:59
[Runtime Error] : Exception: Access violation at address 0077D26D in module 'scar.exe'. Read of address 00000000 in line 5 in script
2010-05-16 20:34:30
2010-05-16 20:53:17
program New;
function MailError(Error, Text: String): String;
begin
Page := InitializeHTTPClient(False, False);
ClearPostData(Page);
AddPostVariable(Page, 'error', Error);
AddPostVariable(Page, 'text', Text);
Result := PostHTTPPageEx(Page, 'http://www.domain.com/mail.php');
end;
begin
FreeHTTPClient(Page);
MailError('Error', 'Video Out Of Date');
end.
2010-05-16 20:54:16
2010-05-16 20:56:11
program New;
function MailError(Error, Text: String): String;
var
Client : integer;
begin
Client := InitializeHTTPClient(False, False);
AddPostVariable(Client, 'error', Error);
AddPostVariable(Client, 'text', Text);
Result := PostHTTPPageEx(Client, 'http://www.domain.com/mail.php');
FreeHTTPClient(Client);
end;
begin
MailError('Error', 'Video Out Of Date');
end.
2010-05-16 21:23:10
2010-05-16 23:29:59
From: death12652
Okay It executes and stuff so will it email me the 'Error' and 'video out of date' part or what. Also I want it to email what video. The videos are in a seperate scar file set up as arrays. It chooses a website randomly and goes to it. I want it to send me an email if the video is out of date? I used an OpenWebPage() Function. Thanks.
2010-05-18 17:59:08
2010-05-18 18:06:10
From: death12652
I did what you said but it doesn't send the email. It says successfully compiled but doesn't send the email?
2010-05-18 22:35:53
program smtpEmail;
Procedure WaitForResponse(c : Integer);
var s : String;
begin
repeat
if (ReadConnectionData(c, s)) then
begin
Wait(50);
end else
begin
Writeln('Connection error');
Exit;
end;
until (s<>'') or (not IsConnectionOpen(c));
end;
Procedure SendEmail(smtpserver, frommail, tomail, subject, data : String);
var c : Integer;
begin
c := OpenConnection(smtpserver, 25, 1000);
WaitForResponse(c);
SendConnectionData(c, 'HELO me' + #13#10);
WaitForResponse(c);
SendConnectionData(c, 'MAIL FROM: ' + frommail + #13#10);
WaitForResponse(c);
SendConnectionData(c, 'RCPT TO: <' + tomail + '>' + #13#10);
WaitForResponse(c);
SendConnectionData(c, 'DATA' + #13#10);
WaitForResponse(c);
SendConnectionData(c, 'Subject: ' + subject + #13#10#13#10);
SendConnectionData(c, data + #13#10);
SendConnectionData(c, '.' + #13#10);
WaitForResponse(c);
end;
begin
SendEmail('smtp.windstream.net', 'illkillutill@live.com', 'MyPhoneNumber@vtext.com', 'hi', 'hola');
end.2010-05-18 23:41:15
begin
SendEmail('smtp.live.com', '*********@live.com', '*********@live.com', 'hi', 'hola');
end.
2010-05-18 23:45:15
2010-05-19 00:33:52
2010-05-19 10:58:12
2010-05-19 15:47:05
2010-05-19 16:57:18
2010-05-19 17:15:57
2010-05-19 21:24:09
2010-05-19 22:32:37
2010-05-19 23:02:47
2010-05-19 23:14:24