Results 1 to 6 of 6

Thread: Plugin ABI Version 2???

  1. #1
    Join Date
    Jan 2012
    Location
    Long Island, NY
    Posts
    413
    Mentioned
    5 Post(s)
    Quoted
    95 Post(s)

    Default Plugin ABI Version 2???

    Hey guys I'm looking to add SMS alerts to my script and I'll be doing so by emailing the carrier(ie: 1231231234@vtext.com) via SMTP. I found a nice library called SMTP/POP3 Email Engine or SEE for short. They have multiple sources of the code(C++, Delphi). I downloaded a 32 bit compiled library as see32.dll and placed it in my plugins folder for simba.

    Function List: http://www.marshallsoft.com/see_ref.pdf
    The function I want to use is the seeSendEmail function which is declared in the see32.pas source
    Simba Code:
    function seeSendEmail(Chan:Integer; Rcpt, CC, BCC , Subj, Msg, Attach:PAnsiChar):Integer; stdcall;

    My test script looks as follows.
    Simba Code:
    program new;
    {$loadlib see32}

    procedure sendTestEmail;
    var
      chan : integer;
      rcpt, cc, bcc , subj, msg, attach : string;
    begin
      chan := 0;
      rcpt := 'test@test.com';
      cc := '';
      bcc := '';
      msg := 'This is a test message';
      attach := '';
      seeSendEmail(chan, rcpt, cc, bcc, msg, attach);
    end;

    begin
      sendTestEmail;
    end.

    But running it I get an error, Skipping plugin due to ABI being older than version 2??? Do I need to recompile the source to include something that it works with SIMBA, or am I just doing this wrong?

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Lol.. You can't just take any dll and place it in the plugins folder and expect it to work.

    You haven't exported any of the functions using the Simba Plugin API. Since none of the exports exist, it's not a plugin.. Just a plain dll/module. Also since the function for plugin version isn't found in that module, it automatically assumes the lowest version of the plugin API and will NOT work with Simba as its deprecated.

    TLDR; export the functions and implement the plugin interface. P.S. Prosocks can also send emails.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Jan 2012
    Location
    Long Island, NY
    Posts
    413
    Mentioned
    5 Post(s)
    Quoted
    95 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    P.S. Prosocks can also send emails.
    Ok I understand how plugins work with Simba now. I tried to use your function in Prosocks v0.5 but I can't get it to work.
    Simba Code:
    {$loadlib prosocks}
    var
      S: SSLSocket;
      url, user, pwd, name, recipient, cc, bcc, subject, body, bodymime, filename, filemime: string;
    begin
      S.Init();
      S.SetVerbose(true);
      S.SetSecurityPolicy(false, false, true);
      url := 'smtps://smtp.gmail.com'#0;
      user := ''#0;
      pwd := ''#0;
      name := 'TestName'#0;
      recipient := ''#0;
      cc := ''#0;
      bcc := ''#0;
      subject := 'TestSubject'#0;
      body := 'This is just a test'#0;
      bodymime := 'text/plain; charset=UTF-8'#0;
      filename := ''#0;
      filemime := 'application/x-msdownload; charset=UTF-8'#0;
      writeln(S.SMTP(@url, @user, @pwd, @name, @recipient, @cc, @bcc, @subject, @body, @bodymime, @filename, @filemime));
      S.Free();
    end.

  4. #4
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Why are you passing the address to variables as the params?

  5. #5
    Join Date
    Jan 2012
    Location
    Long Island, NY
    Posts
    413
    Mentioned
    5 Post(s)
    Quoted
    95 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    Why are you passing the address to variables as the params?
    I don't really know, it asks for a char pointer as the parameters.

    Function SSLSocket.SMTP(url, user, pwd, name, recipient, cc, bcc, subject, body, bodymime, file, filemime: PChar): Boolean;

  6. #6
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Brotein View Post
    I don't really know, it asks for a char pointer as the parameters.

    Function SSLSocket.SMTP(url, user, pwd, name, recipient, cc, bcc, subject, body, bodymime, file, filemime: PChar): Boolean;
    Pointer to array of characters.. If you are passing a string, then the pointer to the characters in the string is located at Index 1 since Simba strings are 1 based arrays.


    IE: @str[1].


    Also, you are not adding attachments to the email.. Why are you specifying the mime-type and file path for a .MSI (Microsoft Software Installer) file?

    Oh and you don't need to null-terminate the strings.
    Last edited by Brandon; 04-26-2016 at 12:51 AM.
    I am Ggzz..
    Hackintosher

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •