JavaMail from Sun Solaris

Ok, I am fairly new to Java. I am trying to send a simpole mail from our Sun Solaris box. With perl or shell I use the malix program. How do I get java to envoke the same program, or is it even possible. If not, is there a default SMPT mail program that comes with Sun Solaris that I can use as the name for the following code:
props.put("mail.smtp.host", smtpServer);
Session session = Session.getDefaultInstance(props, null);
Any help would be greatly appreciated.

What u can do is to envoke a class that uses props.put("mail.smtp.host", smtpServer);
here is the class file:
package com.classes.homepage;
import java.io.IOException;
import java.io.PrintStream;
* Class for sending mail to given email address.
* It is a wrapper of the sun.net.smtp.SmtpClient class which is not documented.
* This way, all public methods of this and the subordinated classes are accessible.
* <p>
* <p><b>Known Bugs:</b>
* @see #startMessage()
* @version $Revision: 1.4.1.3 $ of $Date: 2000/10/06 21:10:46Z $
* @author $Author: Garry Labana
public class testSendMail extends sun.net.smtp.SmtpClient
//++++++++++++++++++++++++++++++++++
// static
     /** SMTP mailhost: Default = "mailhost" */
     protected static String MAILHOST="mailhost";
     public static void setMailHost( String _sMailHost)
          MAILHOST = _sMailHost;
//++++++++++++++++++++++++++++++++++
// public
     * Constructor:
     * To create a new mail object with a connection to the MCBS default mailhost
     * which is by default read from the application properties (DbProperties + Ini files)
     * The respective property is called 'MAILHOST' with the default value
     * "mailhost".
     * @exception IOException indicates problems when establishing connection
     *                                    to the mailhost
     public testSendMail() throws IOException
          this( MAILHOST );
     * Constructor:
     * To create a new mail object with a connection to the specified mailhost.
     * @param sMailhost     the server name of the SMTP mailhost
     * @exception IOException indicates problems when establishing connection
     *                                    to the mailhost
     public testSendMail( String sMailHost ) throws IOException
          super( sMailHost );
     * To send the mai applying the specified parameters.
     * @param sFrom          the mail address of the sender
     * @param sTo          the mail address of the addressee
     * @param sCC          optional addressee for CC
     * @param sSubject     optional mail subject (title bar, ref.)
     * @param sMessage     the actual message. It can have multiple lines
     *                          using the line feed character '\n'.
     * @exception          IOException in case of problems when sending the mail
     public static void sendMail( String sFrom, String sTo, String sCC,
                                        String sSubject, String sMessage )
          throws IOException
          testSendMail rMail = new testSendMail();
          rMail.from( sFrom );
          rMail.to( sTo );
          PrintStream rMailOut = rMail.startMessage();
          // Important: no println but + "\n", as otherwise problems with Unix mail prog.
          // and Netscape
          rMailOut.print( "From: "+ sFrom +"\n" );
          rMailOut.print( "To: " + sTo + "\n" );
          if( sCC != null ) rMailOut.print( "CC: " + sCC + "\n" );
          rMailOut.print( "Subject: "+( sSubject == null ? "Message Content" : sSubject )+"\n" );
          // Important: line feed in front of message as otherwise 'Text:' will be
          // interpreted as token
          rMailOut.print("\n" + sMessage );
          rMail.closeServer();
     * issue the QUIT command to the SMTP server and close the connection.
     public void closeServer() throws IOException {
          super.closeServer();
     public void to(String s) throws IOException     {     super.to( s );     }
     public void from(String s) throws IOException     {     super.from( s );     }
     * This class implements the SMTP client. You can send a piece of mail by
     * creating a new SmtpClient, calling the "to" method to add destinations,
     * calling "from" to name the sender, calling startMessage to return a stream
     * to which you write the message (with RFC733 headers) and then you finally
     * close the Smtp Client.
     public PrintStream startMessage() throws IOException {
          return super.startMessage();
} // class testSendMail

Similar Messages

  • Migrate Oracle Apps 11.5.10.2 from Sun solaris to RHE Linux 32 bit.

    We are migrating the Oracle Apps 11.5.10.2 from Solaris two node to Linux two node including the database Oracle 10.2.04 64 bit.
    Since the applications only support 32 bit we are not able to store CM tier in a 64 bit Linux so with this considerations we are going with the below plan.
    1. Install RHEL 5 as a 32 bit for two nodes ( One for DB/CM and FORMS/WEB)
    2. Migrate the applications and DB from Solaris to Linux as the same node configuration that is
    Node A:
    Oracle DB 10.2.0.4 64 bit ( SUN oS 10 64bit) -> Oracle 10.2.0.5 32bit (RHEL 5 32 bit)
    Oracle Apps CM 11.5.10.2 (SUN OS 10 64bit) -> Oracle apps CM 32 bit(RHEL 5 32 bit)
    Node B:
    Oracle apps 11.5.10.2 forms (sun OS 10) -> Oracle apps 11.5.10.2 forms ( RHEL 5 32bit)
    Oracle apps WEB 11.5.10.2 (SUN OS 10) -> Oracle apps WEB 11.5.10.2 ( RHEL 5 32 bit).
    Question : 1. Did you see any snag on this kind of migration
    2. Any documentation to migrate the Oracle APPS 11i 10.2.0.4-64 bit database from Sun Solaris to oracle apps 11i 10.2.0.5-32 bit on Linux

    Hi,
    1. Did you see any snag on this kind of migrationWhy would you downgrade the db from 64 bit to 32 bit. As 32 Bit has lot of memory limitations.
    You could keep the database on 64 bit for linux too.
    2. Any documentation to migrate the Oracle APPS 11i 10.2.0.4-64 bit database from Sun Solaris to oracle apps 11i 10.2.0.5-32 bit on Linux Please see
    Note 238276.1 - Migrating to Linux with Oracle Applications Release 11i
    Using Oracle Applications with a Split Configuration Database Tier on Oracle 10g Release 2 [ID 369693.1]
    10g Export/Import Process for Oracle Applications Release 11i [ID 331221.1]
    10g Release 2 Export/Import Process for Oracle Applications Release 11i [ID 362205.1]
    Notice to Oracle E-Business Suite Customers: Correction to Export/Import Notes [ID 1055539.1]
    EBS 11i Export/Import Fails On Admsc1020.sql Due To Missing Catmgdidcode.sql [ID 804665.1]
    Thanks
    Edited by: EBSDBA on Oct 25, 2011 5:30 PM

  • How to restore a Oracle 9i Backup from Sun Solaris to Linux

    Dear all,
    I am using Oracle 9.0.1.
    I make a Hot Backup which made by Rman in the Sun Solaris
    and now, I want to restore this backup to the Linux machine.
    But in the Linux machine,
    the database name & path is different from that in Sun Solaris.
    Does Oracle backup can restore across different platforms?
    Does anyone know how to do write ryman statement to do this?
    Thank for your kindly help.
    Wilson

    You cant resore backup in different platform.
    /Jonas

  • Accessing 8.0.5 NT data from Sun/Solaris

    I'm attempting to access data from an NT box via Sun/Solaris. I'm being told I can do this via ODBC Client installed on the Sun/Solaris box.
    If this is true - is it JDBC for the specific Oracle version (8), for the Sun box?
    Many thanks - replies to [email protected] please.

    Andrey Antonov (guest) wrote:
    : I have many control files for loading data from DBF files. On
    : 8.0.5 for Linux they don't work.Why?
    To my knowledge support for DBF files was dropped in Oracle8.
    In practice it may even work for releases up to 8.0.4 but not
    in 8.0.5. What you can probably do is to use sqlloader from an
    earlier version e.g 7.3.4 (from client machine) to load these
    files.
    null

  • Invoking Web Forms from Sun Solaris Client PC

    HI,
    Can any one tell me whether we can invoke Web forms in Sun Solaris Client PC. If yes what is the way, either do we need to use the Netscape Navigator browser or some thing else to invoke the same.
    Thanks in advance.
    Regards,
    S.Karthick

    Please post Forms questions on the Forms discussion board.
    You'll need a browser (netscape will do) and a JVM (you can use Sun's Java plug-in).
    More info on how to setup this configuration is here:
    http://otn.oracle.com/products/forms/pdf/forms_jdk141.pdf

  • Migration from Sun solaris 8 to Solaris 10

    Hi,
    We are migrating from Solaris 8 to Solaris 10 with the compiler migration also earlier we are using Sun Studio 6 and now it is Sun Studio 11.
    When we are compiling the code on Solaris 10 which has been running on the Solaris 8, we are facing some error. So could you help me on this
    "ResourceManager.h", line 98: Warning (Anachronism): Type names qualified by template parameters require "typename".
    "ConnectionMgr.h", line 62: Where: While specializing "ResourceManager<T>".
    "ConnectionMgr.h", line 62: Where: Specialized in non-template code.
    "ResourceManager.h", line 100: Warning (Anachronism): Type names qualified by template parameters require "typename".
    "ConnectionMgr.h", line 62: Where: While specializing "ResourceManager<T>".
    "ConnectionMgr.h", line 62: Where: Specialized in non-template code.
    2 Warning(s) detected.
    make[1]: *** [obj/ConnectionMgr.o] Error 2
    Not sure of the warning , am not able to see these error on the compilation on Sun Studio 6.Below is the bit of the header file code, where the error is occurring.
    98 typedef map<ResourceID, ResElement *>::iterator ResMapIterator;
    100 typedef list<ResElement *>::iterator ResListIterator;
    We are using a /opt/SUNWspro/bin/CC compiler and the verison is CC: Sun C++ 5.8
    Please help me out about the issue

    Since you are jumping several compiler releases and two Solaris releases, you should migrate in two steps.
    1. Get your application working with Sun Studio 11 on Solaris 8.
    2. You can now run that application on Solaris 10, or you can rebuild it on Solaris 10 and then run it.
    An application built on Solaris 8 will run on Solaris 9 and 10.
    An application built on Solaris 10 cannot be run on Solaris 8 or 9.
    We promise upward binary compatibility, allowing an old binary to be used with a newer compiler or on a newer Solaris. But we can't promise source code compatibility because we don't want to have to duplicate old bugs in old compilers.
    C++ 5.8 in Sun Studio 11 detects errors that older compilers might have missed. The rules about where to use "typename" are one example.
    I would not expect the warning about typename to be generated by either of the source code lines that you show, but I can't really tell without seeing a compilable example.
    You need to use typename when you use a type that depends on a template parameter. Example:
    template <class T> class C1 {
    public:
        typedef T Type;
    template <class T> class C2 {
    public:
        typename T::Type a;
    C2< C1<int> > c2i;If in C2 you do not specify typename, the compiler does not know whether T::Type is intended to be the name of a type. If it is not a type, the code is always invalid. The C++ rule is that if an an identifier is not known to be a type, it is not a type. You use typename to tell the compiler that T::Type is supposed to be the name of a type.

  • Booting clients from Sun/Solaris

    We have a Sun X2100 server running Solaris 10 and 4 clients (HP dx2009) on RHEL5 connected thro an 8-port switch.
    Is there a way to boot solaris from the clients bypassing RHEL ? We want to use the clients as 'dumb' terminals.

    Darren,
    Thanks for your tipoff.
    We tried it but still unable to connect. The part that referes to the dhcp config is a problem. In DHCP manager (dhcpmgr), in the "Client ID" field, we are unable to understand if 01(MAC address) means "01" or the full mac address. We tried with both 01 and full mac address in this field but an error message appears for the latter.
    Do you know if JDE will cause this error coz this procedure works to connect to CDE only ? We are logging into JDE presently.
    Also, when we tried logging into CDE after this procedure, CDE hangs !
    ~schetty

  • Migration from sun/solaris to windows

    While performing a migration of SAP from solaris to windows OS what are the implications, issues and things to keep in mind. Also which database would give the best performance (Oracle or MS SQL) and what are the specific requirements if latest release of MS SQL is to be used the database.

    > That is fine but I rather need to know that if the database is changed from Oracle10.2  to MS SQL 2000 then what can be the implications and what will be the additional hardware requirements, if the current SAP configuration is 4.6D and it is migrated to 32 bit windows server 2003.
    Why do you plan to use the almost 10 year old SQL Server 2000? It's like going back to Oracle 7.x times! SQL Server 2005 would be the way to go.
    > Whether shifting to MS SQL server 2000 would give an added advantage?
    Advantage for whom?
    - Oracle is expensive, the licenses and the annual maintenance is higher compared to SQL Server
    - Oracle is complex, SQL Server is much easier to maintain
    - Windows adds an additional risk (Virus, Malware) which is has to be dealt with separately (Firewalls, Virusscanners etc.) which in turn is additional work and hence costs additional money
    - Windows is not always a deterministic operating system ("it works again after reboot, nobody knows why")
    > My job is to give the pros cons of both configurations.
    I would do some research what both combinations are able to do, if you need certain Oracle features that are not available on SQL Server, if you developers and administrators are more convenient with Oracle, if you have specific requirements about performance that can't be fullfilled with SQL server etc.
    All that are things you have to evaluate and check. Since we don't know how you use the system and what you do with it we can't tell you what's "best" for your environment.
    Markus

  • RMAN Restore from Sun Solaris 9 Sparc to Sun Solaris 10 X86

    Hello,
    I will need to perform a restore from a 10.2.0.4 DB on Sun Sparc to a Sun X86 10.2.0.4 DB. Since its the same platform will I have any issues?

    Those are different endian formats and therefore will require the use of Cross-Platform Transportable Tablespaces or expdp/impdp.
    Check Cross-Platform Tranportable Tablespace: CONVERT DATAFILE or TABLESPACE for details on the process.

  • Migration of 9iAS R2 from Sun to Linux

    We want to migrate out 9i AS infrastucture and server from Sun Solaris to RedHat AS 3. I have been looking for directions on how to do this, but have come up blank. Can someone point me to a document or something that tells us how to do this?
    Any help is much appreciated.
    Thanks ... Vin

    Its basically a fresh install and then a data conversion.
    Install 9iAS R2 on Linux machine
    Patch up to latest levels on both machines
    Synchronize your LDAP database/user store
    export/Import your content areas
    If you keep the same hostname/ip address for the new server, you may get lucky - do a fresh install with the same settings as your current system on the linux box, shutdown the rdbms, do an import/export database migration - bring everything up and cross your fingers :)

  • Installation BOBJ XI 3 on UNIX ( Sun Solaris ) with Oracle database

    Hi All,
    I want to deploy and install BOBJ XI Enterprise 3.1 on Sun Solaris with oracle database.
    My question is, do we need to add some oracle licenses stuff in BOBJ XI Enterprise server or we just using a connection from Sun Solaris to oracle database ?
    Pls Advise,
    Rgds,
    Denny

    Hi Denny,
    the risk is the same whatever DB server you are using. Once you have a setup where more than one application access the server, overload caused by one application can influence the performance of the other ones. You have to check if your DB vendor offers tools to monitor and limit the load on your DB server. But we are talking hypothetically now. I would recommend to check what's the actual load on your oracle DB server. If the server is not working at the limit (let's over 80% all the time), then I think that you can try to install BOBJ also in an existing oracle instance on the oracle server. You can reduce the risk and make the maintenance easier if you setup a dedicated oracle instance on your DB server just for the BOBJ repository.
    Regards,
    Stratos

  • Migration oracle 9i from  sun solrise to RHEL

    hello gurus
    we are working on migration from sun solaris 10 to red hat. for oracle 9i RAC. can anyone please guide us how we should go about that and if anybody can please provide me any supporting link.
    Thanks in advance
    Message was edited by:
    closetodestination

    You need to have a look at one of the main db groups for that. I reckon you could do transportable tablespaces as long as there are no endian problems......
    Barry

  • Trouble with Solaris 10 install on SunBlade 100 using Media CDs from Sun

    Hello World,
    My SunBlade 100 was not reading various burned Solaris 10 media, so I purchased the media kit from Sun. The installation is successful up until the point where it asks for CD2. I didn't even hear the drive spin when I clicked "Next" after inserting CD2.
    I know it is not the CD drive since it obviously works for CD1. It is also not an intermittent problem with the CD drive because CD1 works each time I run the install. I also don't think it is the media since CD2 went right from the factory envelope to my CD drive.
    So:
    1. Has anyone encountered something like this?
    2. Can I resume the installation from the command line?
    Many Thanks,
    Greg

    Actually ...
    Yes, it can be the optical drive.
    Those factory shipped drives in the SB100's were prone to spontaneously failing, one minute to the next.
    Additionally the CD's are actually written differently, whether they are the bootable ones in the set versus the non-bootable CDs in the set.
    Data track layouts are different.
    The optical drive could commonly have difficulty reading every disk you ever insert into it.
    Borrow a replacement drive from a PeeCee.
    Jumper it the same as the current drive and just use it.
    If that works, then go buy a replacement.
    Optical read-only drives are laughably cheap.
    Optical read/write DVD drives are inexpensive, as well.

  • Application Migration from HP-UNIX to SUN Solaris

    Hi Gurus,
    Need help on the application migration from HP-UNIX to Sun Solaris . Copied the filesystems APPL_TOP, OA_HTML, OA_JAVA, COMMON_TOP/util and COMMON_TOP/_pages from SOURCE( HP) to TARGET SUN-solaris as per 238276.1
    Now trying to clone Autoconfig XML context file on the TARGET System
    perl adclonectx.pl migrate java=\opt\java1.4 \
    contextfile=\ul01\app\applmgr\lasrx\admin\LASRX_fiapd4.xml
    Error: source context file ul01appapplmgrlasrxadminLASRX_fiapd4.xml does not exist.
    Questions:
    ======
    1. we still need to install jdk in the TARGET or copy the file system from source(HP) to target( Solaris) bring the JDK and how to check jdk on Solaris?
    2. In clone autoconfig XML, contextfile=? Is the location of SOURCE or TARGER?
    3. I think running above with root permission.
    Please help somebody on this issue.
    Thank You.

    Hi Hussein,
    I need your help on the Application migration from HP-UNIX to SUN Solaris. As per the note 238276.1 we dont copy $806_ORACLE_HOME for cross platform migration, Copied all the filesystem from SOURCE to TARGET but rename it because it suppose to create while installing Middle tier.
    Issue:1
    =====
    When i start to set environment like below, i get the error and
    . /ul01/app/applmgr/lasrx/APPSORA.env
    ksh: /ul02/app/oracle/lasrx/8.0.6_new/LASRX_fiapd4.env: not found
    I am trying to install Middle Tier Technology Stack on SUN server ( Migrating from HP-UNIX to SUN solaris)
    Issue 2: ( Display error) while install Tech Stack
    =====
    ./rapidwiz -techstack
    Rapid Install Wizard is validating your file system......
    >> Wizard requires the DISPLAY variable to be set.
    >> Please set your DISPLAY variable and restart Rapid Install Wizard.
    even i can not see
    echo $DISPLAY because not set the environment.
    Need your help and suggetions on this.
    Thank You.

  • Clone the Solaris OS from Sun Fire X4200 M2 to Sun Fire X4100 M2

    Dear all,
    May anyone help me?
    I want to clone the all slices (whole hard disk) in Solaris 10 OS from Sun Fire X4200 M2 Server and then restore it back to Sun Fire X4100 M2 Server. Is it possible to do this? If "Yes", may show me how to do it?
    I appreciate for your help.
    Thanks you in advance,
    Soret,

    Hi.
    It's possible, but depend of used file systems, used or not voluem manager, hardware configuration.
    Possible steps:
    1) Make Backup x4200 ( on internal disk or third NFS storage )
    2) Boot x4100 from installation DVD in to Single user.
    2.1 Partitioning disk
    2.2 Create New FS
    2.3 Restore backup on new FS. ( need configuree network, and mount disks with backups over NFS )
    2.4 use devfsadm for rebuild device tree
    chroot <new_root> devfsadm
    2.5 Make neaded customization on new system.
    2.6 Install grub and bootblok ( installboot )
    2.7 Umount all new FS; halt system.
    3) Try normal boot new system.
    Some step for create new disk you may do on original server. Install new disk and make restore on it.
    After- return this disk to x4100.
    Regards.

Maybe you are looking for

  • Not Receiving Emails on my Tour9630

    Thursday I didn't get any emails from my external email accounts (Yahoo, Hotmail, Work) until 11:40PM Pacific then I got a whole days worth.  Since then I haven't received anything. My phone works, text messaging works, the brower works, I can see th

  • Almost impossible to revive this machine??

    Hey, Got a macbook pro 15, mid-late 2007 Was installing updates on my computer but it froze, screen went black and no movement for 12 hours, so decided to take my chance and force it off. Big Mistake. Upon starting laptop blue lines are now on screen

  • How to create partner in idoc

    hello friends , i am new in ALE IDOC i don't know  how to create partner in IDOC. thanks in advance

  • Why is every link showing up with an A in a square?

    The only thing that I have recently installed was Microsoft Office, but I paid for it so I don't think that any unwanted files came with it upon installation.

  • Time machine is asking for a password.  What password is it asking for, and where is it?

    I'm trying to restore a machine that has ben seriously compromised... I have a disk image, I have backups, I have Time Machine. Time Machine is asking for a password to restore - there is no password in keychain, no administrator password works, I ha