Recent

Author Topic: Send mail for program`s statistic  (Read 10054 times)

Alex Cones

  • Jr. Member
  • **
  • Posts: 73
    • FLSoft
Send mail for program`s statistic
« on: September 04, 2010, 07:43:53 pm »
Hi!

I need to gather count of users of my program. I think, that good way for that are sending mail from my program to my mailbox. I want to have only number of users, not comp information or another crap.

But I have a little problem with that. I find a code for "secret" mail sending, but can`t translate this code to Lazarus:
Code: [Select]
program Project1;
 
{$APPTYPE CONSOLE}
 
uses IdSMTP, IdMessage;
 
{$R *.res}
 
var smtp : TIdSMTP;
    msg  : TIdMessage;
 
begin
  smtp := TIdSMTP.Create(nil);
 
  smtp.AuthenticationType := atLogin;
  smtp.Username := 'from@mail.ru';
  smtp.Password := 'ChangeMe';
  smtp.Host     := 'smtp.mail.ru';
  smtp.Port     := 25;
 
  smtp.Connect;
 
  if smtp.Authenticate then
  begin
    msg := TIdMessage.Create(nil);
 
    msg.Subject := 'Subject';
    msg.Body.Add('Mail body.');
    msg.From.Text := 'president@whitehouse.gov';
    msg.Recipients.EMailAddresses := 'to@yandex.ru';
 
    smtp.Send(msg);
    smtp.Disconnect;
 
    msg.Free;
  end;
  smtp.Free;
end.

Help me, please.
To beer or not to beer?
_____________________
I`m terribly sorry for my Anglish. :)

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Send mail for program`s statistic
« Reply #1 on: September 04, 2010, 08:00:13 pm »
I think it is not a good idea.

Alex Cones

  • Jr. Member
  • **
  • Posts: 73
    • FLSoft
Re: Send mail for program`s statistic
« Reply #2 on: September 04, 2010, 08:02:44 pm »
Can you offer something better?
To beer or not to beer?
_____________________
I`m terribly sorry for my Anglish. :)

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Send mail for program`s statistic
« Reply #3 on: September 04, 2010, 08:05:35 pm »
I'm sure you can think of something better.

Alex Cones

  • Jr. Member
  • **
  • Posts: 73
    • FLSoft
Re: Send mail for program`s statistic
« Reply #4 on: September 04, 2010, 08:09:06 pm »
I find a friend with a own server, who give me a counter page in php. For inc counter need to send user to page with counter.

Question : How to made it? User should not know about it.
To beer or not to beer?
_____________________
I`m terribly sorry for my Anglish. :)

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Send mail for program`s statistic
« Reply #5 on: September 04, 2010, 08:15:59 pm »
Code: [Select]
uses LclIntF

OpenURL(YouPageAddressString);

Quote
User should not know about it.

User has the right to know.
« Last Edit: September 04, 2010, 08:23:08 pm by typo »

eny

  • Hero Member
  • *****
  • Posts: 1665
Re: Send mail for program`s statistic
« Reply #6 on: September 04, 2010, 08:22:55 pm »
User should not know about it.
There's a name for software like this: virus, spyware >:D
All posts based on: Win11; stable Lazarus 4_4  (x64) 2026-02-12 (unless specified otherwise...)

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1945
Re: Send mail for program`s statistic
« Reply #7 on: September 04, 2010, 08:26:13 pm »
Don't do this from your application.
Count the downloads on the software's homepage.

Alex Cones

  • Jr. Member
  • **
  • Posts: 73
    • FLSoft
Re: Send mail for program`s statistic
« Reply #8 on: September 05, 2010, 07:35:07 am »
Quote
virus, spyware
It`s a panel like Cairo Dock.
Quote
Count the downloads on the software's homepage.
I have a few way for "propagating" my program. And there are opportunity, that`s a program will be propagating by another people. I only want to now number of users. I think It`s a not bad thing.

What about that way: ShellExec for iexplorer, in params url in SW_HIDE. After 10-15 secs destroy it?
To beer or not to beer?
_____________________
I`m terribly sorry for my Anglish. :)

 

TinyPortal © 2005-2018