Mail using smtp is going with to field blank

Hi,
I am sending a mail using utl_smtp .receipient is getting the mail.but problem is that he is getting it with blank 'to field'.
Following is the code i wrote.
CREATE OR REPLACE PROCEDURE mis_test_send_mail AS
pfrom VARCHAR2(100):='[email protected]';
crlf CONSTANT VARCHAR2(100):= CHR(13) || CHR(10);
message VARCHAR2(1000);
preceiver VARCHAR2(100):='[email protected]';
psubject VARCHAR2(100):='Test Mail';
mail_conn Utl_Smtp.connection;
mailhost CONSTANT VARCHAR2(50):='mailrelay.organization.com';
BEGIN
message:='How Are You'||crlf;
mail_conn:=Utl_Smtp.open_connection(mailhost);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, pfrom);
utl_smtp.rcpt(mail_conn, preceiver);
utl_smtp.data(mail_conn, message);
utl_smtp.quit(mail_conn);
EXCEPTION WHEN OTHERS THEN
dbms_output.put_line('error :'||SQLERRM||''||SQLCODE);
END mis_test_send_mail ;
Any help on this is highly appreciated.
Regards,
Cheriyan

You need to include any headers that need to be shown in the mail in the message data. The headers section of the data needs to be separated from the body section by at least one blank line.
message:= 'From: "sender name" <[email protected]>' || crlf;
message:= message || 'To: "recipient" <[email protected]>' || crlf;
message:= message || 'Subject: this is only a test' ||crlf;
message:= message || crlf;
message:= message || 'How Are You' ||crlf;The utl_smtp.mail and utl_smtp.rcpt procedures just tell the recieving SMTP server who is sending it and who to deliver it to, but what the recipient sees is what's in the headers section of the utl_smtp.data payload.
You can take advantage of this in that you can include multiple calls to utl_smtp.rcpt, but not include them in the payload's header section. This is exactly what happens when you use your mail client to send blind carbon copies of an email.

Similar Messages

  • SMICM error while sending mail using SMTP server

    Hi All,
    We are not able send mails using SMTP server.
    We have made every settings necessary in SCOT, SO16 , SMTP service is activated, default domain is maintained etc
    Only things which seems to be wrong is in SMICM trace file.
    [Thr 13] *** ERROR => NiBufIConnect: non-buffered connect pending after 5000ms (hdl 29;10.26.24.44:1090) [nibuf.cpp    4608]
    [Thr 13] *** WARNING => Connection request from (0/1/0) to host: 10.26.24.44, service: 1090 failed (NIECONN_REFUSED)
    [icxxconn_mt.c 2321]
    This error is getting repeated in it.
    BUt I am not sure why it it trying to hit 10.26.24.44, as we dont have any server by this ip. The ip is only not resolvable from the server.
    1 more thing, at OS level, following parameter is maintained in profile :
    icm/server_port_1 = PROT=SMTP,PORT=25000,TIMEOUT=180
    But in SCOT, under SMTP node PORT is given as 25.
    Kindly let me know what going wrong here?
    Thanks

    also getting error as follows
    Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1
    Authentication Required. Learn more at
       at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
       at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)
       at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       at ST_c121e07caaa94c21bb1355d4f753112f.vbproj.ScriptMain.Main()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
       at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

  • Sending mail using smtps protocol

    Could anyone post a piece of code to show how to send a message using smtps protocol?
    SSLNotes of 1.3.2ea version say that it's possibile, but i tried whithout success....
    Thanks

    Hello,
    I can send the mail using SMTP with the help of java mail api. But i want to send mail using SMTPS protocol using java. The mail should be encrypted format.
    So, my queries are:
    1. How to send mail using SMTPS protocol?
    2. I want to send the mail as encryption mail. So how to create encrypted mail.?
    Thanks in advance.
    From
    Rajendra.

  • Mail.app won't leave my password field blank.

    mail.app won't leave my password field blank on OS X Mavericks. I need it blank for security.  How to fix?

    anyone, anyone? I switched from a Windows desktop, and frankly, have had little but problems with the supposedly perfect mac... At least I could send **** emails on my Windows machine...

  • How do I use 'submit' as complete pdf, and use 'drawn my signature' with required fields?

    I have created a form with required fields, no problem. The form can be completed with adobe reader, and a signature added using Sign > Place signature > Draw my signature, great. But i need the required fields to be checked and then sent by email, so I have add a button and set the action to "Submit a form" and selected "PDF The Complete Document" from the options. I then add the javascript URL - mailto:????@????.com, but now the "Draw my signature" option is greyed out.
    I have asked this question a number of times, and cannot get a proper answer, please can someone help or offer a work around.

    George,
    Thanks for your response, but I am not sure it fully answers my question. I have attached a screenshot to show what I mean - here I have created a simple form, with one required field for some data, using Acrobat XI. If I open the form (I have not reader enabled the form) in Adobe Reader XI, I am able to add a drawn signature, I could save the document then attach to an email to send as you have suggested.
    But, If I now add a Submit button, set the URL to mail it to [email protected] and select "PDF the complete document" as below
    When I open the document in Adobe Reader now, the signature options are all greyed out as you can see.
    Hope this clarifies my predicament

  • Why do i get an error 63 when i sent a mail use SMTP Email

    I used "SMTP Email Send Message.vi" but i have allways the error 63. How can I reslove this error? Ist  this a port error? a pop up displayes and  shows that i should to change the option under the tool palette-> Server.Vi but Ido not know what i can do?

    What SMTP server are you trying to use? Your own? Obviously, it is refusing your connection attempt. The SMTP VIs exclusively use the classic SMTP port (25), but many newer mail servers require different authentication, port, encryption, etc. for security reasons.
    Start with this search.
    LabVIEW Champion . Do more with less code and in less time .

  • Why do i get an error 66 when i sent a mail use SMTP Email Send File.vi?

            When i use SMTP Email Send File.vi,it works very well for some special mail sever such as the sever of my company,For others,while debugging it ,i use a free email address from 163 (http://mail.163.com/) or Sina(http://mail.sina.com.cn/) i get an error 66.I use the default sever port number(incoming mail sever(POP3):110,Outgoing mail sever(SMTP):25).
     Server information for 163:
       incoming mail sever(POP3)op3.163.com
       Outgoing mail sever(SMTP):smtp.163.com
     Server information for Sina:
       incoming mail sever(POP3)op3.sina.com
       Outgoing mail sever(SMTP):smtp.sina.com
    Thank you!

    According to the LabVIEW documentation error code 66 is: "The network connection was closed by the peer", which is not very helpful. There could be a number of reasons why this happens. Could also be that the server was down. I had trouble connecting to one of the sites you listed. Does the server require authentication? I tried the links you provided, but they're in a foreign language and I can't read them, so I can't tell. If authentication is required, then the SMTP VIs provided with LabVIEW won't work since they don't handle authentication. If the server requires authentication you can try the updated OpenG SMTP VIs that I had posted in this thread.

  • Getting table script using dbms_metadata.get_ddl, but with clob field

    So, Oracle 11g R2..
    I'm using dbms_metadata.get_ddl to get table scripts and it's working fine..
    now, I have a table with clob field, and it's not working... I got an 'missing right parenthesis (ora-0907)' error...
    I could paste a script that I got, but I don't think it makes any sense..
    does anybody have some experience on using this package on clob tables?
    tnx

    this is script that I got... it's long, and it looks like it's not good
    CREATE TABLE "COMMON"."TEST_AAA2"
       (    "ID" NUMBER(10,0),
        "TEKST" VARCHAR2(200 CHAR),
        "UPDATESTAMP" DATE,
        "OBJEKAT" CLOB,
         CONSTRAINT "TEST_PART_PK2" PRIMARY KEY ("ID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "USERS"
      ALTER INDEX "COMMON"."TEST_PART_PK2"  UNUSABLE ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS  LOGGING
      STORAGE(
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE LOGGING
      STORAGE(
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))
      PARTITION BY RANGE ("UPDATESTAMP")
    (PARTITION "P_201012"  VALUES LESS THAN (TO_DATE(' 2011-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_201101"  VALUES LESS THAN (TO_DATE(' 2011-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_201102"  VALUES LESS THAN (TO_DATE(' 2011-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_ARCHIVE"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_201103"  VALUES LESS THAN (TO_DATE(' 2011-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_201104"  VALUES LESS THAN (TO_DATE(' 2011-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_ARCHIVE"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_201105"  VALUES LESS THAN (TO_DATE(' 2011-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_201106"  VALUES LESS THAN (TO_DATE(' 2011-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_ARCHIVE"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_201107"  VALUES LESS THAN (TO_DATE(' 2011-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
    PARTITION "P_MAXVALUE"  VALUES LESS THAN (MAXVALUE)
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS )

  • Most email I send using warpdriveonline is received with the body blank. Haven't seen this problem in I.E. Not sure if it is the browser.

    I am using webmail from USA Cable, which uses warpdriveonline. They are still researching my problem but think it might be browser related. Most but not all email I send is received with the body blank. It is also blank in my sent mail.

    Carole,
    If it talks about your password it is probably a scam.
    Take a look in your purchase history and see if there has really been a purchase.
    Also you can refer to this document:  Identifying fraudulent "phishing" email

  • Can someone help me send mail using SMTP server?

    I am having the most frustrating problem with SMTP outgoing email account.  I use GoDaddy's Webmail (smtp.secureserver.net) and I receive all my emails through Apple Mail but I cannot send any.  I haven't been able to for about two weeks now, aside from 3 or 4 fleeting windows of time when I could.  Almost all of the time I try to send my emails, an error message says my outgoing account is offline.  I've been on the phone with GoDaddy's tech support three times this week and did everything we could think of, which include these steps:
    -Force Quit Apple Mail --> Restart Computer
    -Change Default Ports to a specific one and uncheck "Use Secure Sockets Layer (SSL)"
    -Check "Use only this server"
    -Delete account completely from Apple Mail and re-load (which I had to go into Time Machine to recover messages, and lots a bunch in the process ugh!)
    Nothing works!  I depend on this email for my business, and I rely heavily on Apple Mail for this account.  All of my other email accounts that I pull through Mail work fine, but of course they are not SMTP outgoing.  Please help...I feel like I've tried everything and nothing works permanently. 

    At this point there are 2 possible causes to your problem:
    Apple Mail
    Connectivity between you and the SMTP server
    I can't help with (1) as I use Thunderbird as my mail client (the biggest advantage being I can take my mail files and move between different versions of Mac OS X). If you suspect that your problem is due to Apple Mail, then using another email client to send a test message will prove the point. If it works, then the problem lies with Apple Mail and somebody else will have to chip in. If it still fails, then there may be connectivity issue between you and the mail server.
    If you google "telnet smtp test" (without the quotes), you will find many articles showing you how to test an SMTP connection using telnet. Don't be put off by the fact that many of the articles assume you are running Windows. The only Mac bit you need to know is that telnet is a command line utility accessed via Terminal. The rest is generic.
    Telnet will allow you to interact with the mail server a line at a time and show you exactly what and where the problem is. If you get an unexpected response from the server, go back to GoDaddy and show them the output. If you don't get any response at all (i.e. "telnet smtpout.secureserver.net 25" just hangs), then take it up with your ISP as you are simply not getting through to the server.
    Good luck.

  • Send a mail using smtp server

    i'm new to java mail api
    i'm using a machine which is in a network under a proxy server and a fire wall.our network has a smtp server.
    i tried to send a amil using a smtp server.
    my codes are
    package mailtest;
    import java.util.Properties;
    import javax.mail.Session;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.InternetAddress;
    import javax.mail.MessagingException;
    import java.io.*;
    import javax.mail.Message;
    import javax.mail.Transport;
    public class FirstMail {
    String mailServer;
    String host;
    public FirstMail() {
    //global
    mailServer="mail.smtp.host";
    host="mail.informatics.lk";
    // Get system properties
    Properties myProperties=new Properties() ;
    // Setup mail server
    myProperties.put(mailServer,host) ;
    myProperties.put("mail.smtp.auth", "true");
    // Get session
    Session myMailSession;
    myMailSession=Session.getInstance(myProperties,null);
    //myMailSession.setDebug(true);
    // Define message
    MimeMessage message=new MimeMessage(myMailSession);
    // Set the from address
    //try {
    try {
    message.setFrom(new InternetAddress("[email protected]","CHANAKA ARUNA"));
    catch (UnsupportedEncodingException ex1) {
    System.out.println("CAN NOT SEND FROM");
    catch (MessagingException ex1) {
    System.out.println("CAN NOT SEND FROM");
    // Set the to address
    try {
    message.addRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    catch (MessagingException ex) {
    System.out.println("CAN NOT SEND TO");
    // Set the subject
    try {
    message.setSubject("RE:$$$$");
    catch (MessagingException ex2) {
    System.out.println("WRONG SUBJECT");
    // Set the content
    try {
    message.setText("***chanaka***");
    catch (MessagingException ex3) {
    System.out.println("WRONG MESSAGE");
    // Send message
    try {
    Transport.send(message);
    System.out.println("MESSAGE SENT");
    catch (MessagingException ex4) {
    System.out.println("UNABLE TO SEND");
    public static void main(String[] args) {
    FirstMail firstMail1 = new FirstMail();
    it was not work, but when i use the ip address of smtp server instead of mail.informatics.lk at
    host="mail.informatics.lk";
    it worked properly and i could get a mail to my yahoo address.
    but i have seen some have used host name like
    host="smtp.snet.yahoo.com";
    how can i do it using yahoo smtp server.
    also i want to know whethr i can use that our smtp server from a computer outside of the net work.
    pls help me
    txs lot.

    Almost certainly, if you are behind a proxy server it will only be a proxy for HTTP traffic, and you will not be able to communicate with an SMTP server outside your network. But you have your own SMTP server so why would you want to?
    If you have a proxy server and an SMTP server then there will be people responsible for supporting them. Talk to those people and ask them to give you the basic explanation of networking that you need.

  • Use of selection table with 4 fields

    Hi everyone
    Can someone please explain to me what is the use of the seltab 4 fields, how they are used and provide an example, cos Im kinda struggling understanding them...
    Thanks in advance
    Adam

    Hi,
    Explicity there is a selection table for select-options that is seltab and it have sign, low, high, and option.
    Actually these values are also available in ranges.
    Just to explain you go through this info.
    What are the difference between SELECT-OPTIONS & RANGES?
    Here both SELECT-OPTIONS & RANGES works for the same purpose. They both are used for the range selection from selection screen. The main diff. between them is, while we use SELECT-OPTIONS system implicitly creates the select options internal table which contains the fields of SIGN,OPTION,LOW & HIGH. But in case of RANGES, this internal table should be defined explicitly.
    Eg. to SELECT-OPTIONS :
    REPORT YARSELECT.
    TABLES YTXLFA1.
    SELECT-OPTIONS : VENDOR FOR YTXLFA1-LIFNR.
    INITIALIZATION.
    VENDOR-LOW = 1000. " It specifies the range starting value.
    VENDOR-HIGH = 2000. " It specifies the range ending value.
    VENDOR-OPTION = 'BT'. " specifies ranges value is in between.
    VENDOR-SIGN = 'I'. "specifies both inclussive.
    APPEND VENDOR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB
    WHERE LIFNR IN VENDOR.
    Eg. to RANGES:
    REPORT YARRANGE.
    TABLES YTXLFA1.
    RANGES: VENDOR FOR YTXFLA1-LIFNR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB
    WHERE LIFNR IN VENDOR.
    Here with RANGES user has to design an internal table with fields -
    SIGN,OPTION,LOW and HIGH EXPLICITLY.
    >
    Example:
    select-options: bukrs for zstock-bukrs.
    Should the user fill in 'ABFI' in BUKRS on the selection screen, BUKRS will look like this:
    IEQABFI
    This is because BUKRS is set as a table as follows:
    begin of bukrs occurs 0,
    SIGN(1) type c,
    OPTION(2) type c,
    LOW like bukrs,
    HIGH like bukrs,
    end of bukrs.
    Now, when you create the following range, it will have the exact same fields set inside its table:
    Ranges: bukrs for zstock-bukrs.
    The difference is, because ranges doesn't show on the selection screen, you will have to fill it yourself, meaning you will have to fill bukrs-sign, bukrs-option, bukrs-low & bukrs-high all manually.
    Some tips:
    Sign is always I (for Include) or E (for Exclude)
    Option can be a whole range, which includes:
    EQ (Equal)
    BT (Between))
    CP (Contain Pattern)
    So let's say you want to have the range check for all company codes not starting with AB, you will set your code as follow:
    ranges: bukrs for zstock-bukrs.
    bukrs-sign = 'E'. "Exclude
    bukrs-option = 'CP'. "Pattern
    bukrs-low = 'AB*'. "Low Value
    bukrs-high = ''. "High Value
    append bukrs.
    Always remember to APPEND your range when you fill it, as the WHERE clause checks against the lines of the range table, not against the header line.
    Hope this explains it well enough.
    >
    What does SIGN "I" & "E" mean?
    The "I" stands for Include, and the "E" for Exclude.
    The easiest way to learn how the range selections work is, create the following dummy program:
    report dummy.
    tables: mara.
    select-options: matnr for mara-matnr.
    start-of-selection.
    loop at matnr.
    write: / matnr-sign,
    matnr-option,
    matnr-low,
    matnr-high.
    endloop.
    Run this program, and fill in a lot of junk into MATNR. Fill in some includes, some excludes, some ranges, etc., and you will soon realise how the system builds ranges (select-options). Once you know that, you can fill your own ranges quickly and efficiently.
    Hope this info helps.
    Regards,
    Kumar.

  • Cannot get Mail using a shared connection with a PowerBook

    This is one of them problems with lots of potential causes, but I have to start asking somewhere.
    I am in a temporary work location.  There is no wireless access available, but there is an available copper connection.
    I plug my trusty old G4 Titanium PowerBook into the ethernet and configure it to share the connection thru its AirPort Card to my iPad (original)
    I can get to web sites with iPad Safari, so that says that the connection is working, but the iPad Mail app cannot connect to anything.  It sits and spins and then says "The mail server "mail.whatever.org" is not responding.  Verify that you have entered the correct account info into Mail settings."
    I know the Mail info is correct because it will connect and operate with no problem when I am at home, connecting to my own AirPort network.
    Any ideas or suggestions ?

    The available ethernet is an open DHCP network, so I just set the Network/Ethernet to DHCP and everything there just works.
    Next I went to Sharing/Internet Sharing.  I set the "Share your connection" control to "Ethernet" and in the "To computers using" control, I selected "AirPort".
    In AirPort Options, I gave the network a name, set Channel to Auto, enabled WEP with a 40-bit key and set a password.

  • Selecting two different Names using the same table with same field

    Hello,
    I am trying to display several fields from different tables. Here are some of the fields that I need: The instructor needs to go after the social.
    WESL | ENGR-1101-SW1 | Hinojosa | Ashley | Social | Instructor |
    I am using a table where they have the social and I need to get both the student and the instructor. How do I select the instructor when the instructor's id is on a different table. example
    CLASS PERSON CLASS_ASSIGN
    student_id student_id: name facutly_id
    Here is the code that I have so far and it works.
    rem ----------------
    rem Filename: cer.sql
    rem Purpose: to get data from banner and put into flat file
    rem Date: August 17, 2006 4:51 P.M.
    rem Author: Robert Hernandez
    rem ---------------
    rem Notes: Need to add the Instructor - having problems
    rem using the same spriden_id.
    rem Also need to have admissions enter the grad date for
    rem several students: Procedure is working as is.
    declare
    l_output utl_file.file_type;
    grad_month varchar2(2);
    buffer varchar2(1000);
    cursor cursor1 is
    select ssrmeet_bldg_code,
    ssbsect_subj_code,
    ssbsect_crse_numb,
    ssbsect_seq_numb,
    spriden_last_name,
    spriden_first_name,
    spriden_id,
    scbcrse_title,
    ssbsect_term_code,
    sfrstcr_grde_code,
    sorhsch_graduation_date,
    decode(substr(sorhsch_graduation_date,4,3),'JAN','01',
    'FEB','02',
    'MAR','03',
    'APR','04',
    'MAY','05',
    'JUN','06',
    'JUL','07',
    'AUG','08',
    'SEP','09',
    'OCT','10',
    'NOV','11',
    'DEC','12') as grad_month,
    sorhsch_sbgi_code
    from ssbsect,ssrmeet,sfrstcr,spriden,scbcrse,sorhsch
    where rownum < 200
    and ssbsect_seq_numb like 'S%'
    and (ssrmeet_term_code = ssbsect_term_code
    and ssrmeet_crn = ssbsect_crn)
    and (ssbsect_crn = sfrstcr_crn
    and sfrstcr_pidm = spriden_pidm
    and length(spriden_id) = 9
    and substr(spriden_id,1,1) <> 'A')
    and (ssbsect_crse_numb = scbcrse_crse_numb
    and ssbsect_subj_code = scbcrse_subj_code)
    and spriden_pidm = sorhsch_pidm
    and sorhsch_graduation_date is null
    order by ssbsect_crse_numb;
    begin
    l_output := utl_file.fopen('CER','rbfpce.txt','W');
    for cur1_rec in cursor1 loop
    buffer:= cur1_rec.ssrmeet_bldg_code||'|'||
    cur1_rec.ssbsect_subj_code||'-'||
    cur1_rec.ssbsect_crse_numb||'-'||
    cur1_rec.ssbsect_seq_numb||'|'||
    cur1_rec.spriden_last_name||'|'||
    cur1_rec.spriden_first_name||'|'||
    substr(cur1_rec.spriden_id,1,3)||'-'||
    substr(cur1_rec.spriden_id,4,2)||'-'||
    substr(cur1_rec.spriden_id,6,4)||'|'||
    cur1_rec.scbcrse_title||'|'||
    cur1_rec.ssbsect_term_code||'|'||
    cur1_rec.sfrstcr_grde_code||'|'||
    '20'||SUBSTR(cur1_rec.sorhsch_graduation_date,8,2)||
    cur1_rec.grad_month||'|'||
    cur1_rec.sorhsch_sbgi_code;
    utl_file.put_line(l_output,buffer,false);
    end loop;
    utl_file.fclose(l_output);
    exception
    when no_data_found then
    utl_file.fclose(l_output);
    end;
    /

    Can you be more precise , please :
    - which table stores the people identities ? (I call this one Identity)
    - which table gives the class where the student works in (I cal l this one Claa_attendees)
    - which table gives the instructor of a class (I call this one Class)
    If your issue is that you have one table which stores Itendities , and you need to display Student identity and Instructor Identity, you have to call this table twice in your query , using table aliases . I mean :
    Select Stud_iden.name, Instr_iden.name
    From Identity Stud_iden, Identity Instr_iden, Class_attendees, Class
    Where Class.clas_id = class_attendees.class_id
    and class.instructor_id = Instr_iden.people_id
    and class_attendees.student_id = Stud_iden.people_id
    Is this what you need to do ?

  • Send Error Type or Description of failed messgaes in body of mail using SMTP adapter

    Hi,
    I want to send failed messages error type or description to admin to notify him for error occurs in BizTalk, with Error description in body part.
    I have set Send port option for "Enable routing of failed messages" and created a send port having SMTP adapter. Now in body I want to send error description.
    Pls advise how can I achieve this.
    -- Kind Regards Sandeep

    When failed message routing is enabled, BizTalk Server does not suspend the message—it routes the message instead.
    When a failed message is generated, BizTalk Server promotes error-report-related message context properties and demotes regular message context properties before publishing the failed message. Compare this to the default behavior when
    failed message routing is not enabled: Messages that fail are suspended. --------
    MSDN
    So if i were in this situation i would prefer to route the failed message to SMTP as well as to some kind of transport from which i can again receive the message ( like MSMQ or File).
    I mean create a send port group and bind 2 send port to this group (SMTP and MSMQ) and bind this group to that orchestration (specified in previous post) which subscribe the Failed Messages. Then bind the MSMQ location to your receive
    location to retry.
    I am not sure wheather it is the optimal solution or not ..... but it will work. Kindly let me know if you are not clear with what i said.
    Regards 

Maybe you are looking for