Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Aust
    Posts
    3

    Question Unanswered: DBMS_SMTP And .Net

    Hi guys,

    Is anyone here know how to use DBMS_SMTP with .Net in windows application?

    Because i'm trying to use DBMS_SMTP to send e-mail using my application.
    I'm using VB.NET for the language.

    thanks
    Last edited by m1dway; 01-29-04 at 03:05.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I would not be surprised that you might be having problems using DBMS_SMTP; because AFAIK no such package exists.
    Perhaps you mean UTL_SMTP?
    DECLARE
    c utl_smtp.connection;

    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    utl_smtp.write_data(c, name || ': ' || header || utl_tcp.CRLF);
    END;

    BEGIN
    c := utl_smtp.open_connection('smtp-server.acme.com');
    utl_smtp.helo(c, 'foo.com');
    utl_smtp.mail(c, 'sender@foo.com');
    utl_smtp.rcpt(c, 'recipient@foo.com');
    utl_smtp.open_data(c);
    send_header('From', '"Sender" <sender@foo.com>');
    send_header('To', '"Recipient" <recipient@foo.com>');
    send_header('Subject', 'Hello');
    utl_smtp.write_data(c, utl_tcp.CRLF || 'Hello, world!');
    utl_smtp.close_data(c);
    utl_smtp.quit(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    BEGIN
    utl_smtp.quit(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    NULL; -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The quit call will raise an
    -- exception that we can ignore.
    END;
    raise_application_error(-20000,
    'Failed to send mail due to the following error: ' || sqlerrm);
    END;

  3. #3
    Join Date
    Jan 2004
    Location
    Aust
    Posts
    3

    Question

    ok....

    If i already create the stored procedure, how am i gonna call it using VB.NET to send mail?

Posting Permissions

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