IT Community - Software Programming, Web Development and Technical Support

Email Send Using MYSQL or Oracle

This is a discussion on Email Send Using MYSQL or Oracle within the Database Support forums, part of the Web Development category; Hi, Any script or Email function avilable to send Email through mysql and oracl database Regards sivaraman....


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 08-07-2007, 08:07 AM
sivaramakrishnan sivaramakrishnan is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 74
sivaramakrishnan is on a distinguished road
Post Email Send Using MYSQL or Oracle

Hi,

Any script or Email function avilable to send Email through mysql and oracl database

Regards
sivaraman.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-08-2007, 03:39 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: Email Send Using MYSQL or Oracle

Hi,

In ORACLE


Code:
CREATE OR REPLACE PROCEDURE SP_MAILFROM_DB_WITH_DATA(pmHost IN VARCHAR2,pmFrom IN OUT VARCHAR2,pmSubject VARCHAR2,pmTo VARCHAR2,pmCC VARCHAR2,pmBCC VARCHAR2,pmContent VARCHAR2)
IS
/**********
pmHost     -> Host Server Address
pmFrom     -> From Id
pmSubject -> Mail Subject
pmCC        -> CC
pmBCC       -> BCC
pmContent  -> Mail Content
****************/
  vMailConnection   UTL_SMTP.CONNECTION;
BEGIN
  vMailConnection := UTL_SMTP.OPEN_CONNECTION(pmHost,25);
  UTL_SMTP.HELO(vMailConnection,pmHost);
  UTL_SMTP.MAIL(vMailConnection,pmFrom);
  UTL_SMTP.RCPT(vMailConnection,pmTo);
  UTL_SMTP.RCPT(vMailConnection,pmCC);
  UTL_SMTP.RCPT(vMailConnection,pmBCC);
  UTL_SMTP.OPEN_DATA(vMailConnection);
  UTL_SMTP.WRITE_DATA(vMailConnection, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || CHR(13));
  UTL_SMTP.WRITE_DATA(vMailConnection, 'From: ' || pmFrom || CHR(13));
  UTL_SMTP.WRITE_DATA(vMailConnection, 'Subject: ' || pmSubject || CHR(13));
  UTL_SMTP.WRITE_DATA(vMailConnection, 'To: ' || pmTo || CHR(13));
  UTL_SMTP.WRITE_DATA(vMailConnection, 'CC: ' || pmCC || CHR(13));
  UTL_SMTP.WRITE_DATA(vMailConnection, 'BCC: ' ||pmBCC|| CHR(13));
  UTL_SMTP.WRITE_DATA(vMailConnection, '' || CHR(13));
  -- FOR i IN 1 .. 2 LOOP
    UTL_SMTP.WRITE_DATA(vMailConnection,pmContent || CHR(13));
  -- END LOOP;

  UTL_SMTP.CLOSE_DATA(vMailConnection);
  UTL_SMTP.QUIT(vMailConnection);
END;
Check it, hope mail sent successfully from DB.
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/3200-email-send-using-mysql-oracle.html
Posted By For Type Date
mysql oracle This thread Trackback 08-29-2007 09:10 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send email in VB.NET 2005(From Windows Applications) psivakumarmca81 VB.NET Programming 2 02-24-2008 07:20 PM
How to send email in VB.NET 2005(From Windows Applications) psivakumarmca81 Discussweb HQ 2 02-22-2008 08:33 PM
MySQL Vs Oracle - Comparison prasath Database Support 1 08-18-2007 01:01 AM
oracle VS mysql jegan Database Support 0 07-20-2007 06:17 AM
How to Send Email from a PHP Script Using SMTP Authentication? Sabari PHP Programming 1 07-20-2007 05:42 AM


All times are GMT -7. The time now is 09:20 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0