Writing a program that sending e-mails , Please help

Hello ,
I want to write a program that gets
the the user email (the server of the email , it's username and passowrd)
and the reciver email , and the message , and sending the message from the
user's email to the reciver email.
But I want to write by myself a class that connects to the user's email
and not to use Smtp classes....
(I know how to use Sockets , etc...)
But I actually dont know where to start from...
Okay ,I know that first of all I need to get from ther user the server of his email , his username
and his password.
(I will take Gmail for example)
So I create a Socket
Socket mySocker = null;
try
mySocket = new Socket("smtp.gmail.com" , 465);
} catch (UnknownHostException e) {
            System.err.println("Don't know about host : Gmail.");
            System.exit(1);
} catch (IOException e) {
            System.err.println("Couldn't get I/O for the connection to: Gmail.");
            System.exit(1);
        }but from here , how do I connect the user's email with the password and the username that he gave me..?

duffymo wrote:
Gonen wrote:
Hello ,
I want to write a program that gets
the the user email (the server of the email , it's username and passowrd)
and the reciver email , and the message , and sending the message from the
user's email to the reciver email.
But I want to write by myself a class that connects to the user's email
and not to use Smtp classes....Why not?
(I know how to use Sockets , etc...)If you're going to connect to SMTP servers, you'll make a socket connection to the default port and then....send....SMTP commands....so.....it'll.....understand.....you.
Geez, if you want to learn how to write SMTP from scratch this makes sense, but if you just want to send e-mail I'd reconsider and just download JavaMail.
%I am not doing it becuase I need it , I am doing to train :)
and do you have any list of SMTP commads or somthing like that??

Similar Messages

  • I have just updated to iso5 on my ipod 4th gen and now i can not send e-mail please help

    since updating to ISO5 i can no longer send e-mails form my ipod touch 4th gen.
    I could befor and the settings all look ok to me but no luck.
    Any help would be appreciated.

    Have you tried the usual cures such as resetting your phone or backing it up then restoring from the backup?

  • Procedure or Function that send E-mail with image background and file attached

    hi
    I4d like know if someone there is a procedure or function that send E-mail with image background and file attached, for me.
    thanks
    Josi Vieira

    If you go to this part of OTN you will find the official Oracle UTL_SMTP demo, which includes attachments:
    http://technet.oracle.com/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    Getting a background is slightly trickier. The UTL_SMTP package is for primarily sending text e-mails, whereas images require HTML e-mail. I suggest you look at the structure of a sample HTML e-mail and see if you can write the necessary HTML strings in the DATA parameter. Otherwise you'll need to investigate handcrafting a program based on the UTL_TCP package.
    [rant]
    If this seems like a lot of trouble I agree and urge you not to bother. HTML e-mail is one of the curses of the modern age, not least because it is frequently used by purveyors of viruses. I have a filter on my Outlook client that strips out all the HTML in any e-mail I receive, which means I get lots of e-mails rendered unreadable by the inclusion of <HTML> tags. But who cares, they're mostly spam anyway. In fact, the use of HTML in an e-mail is almost always an indicator of the irrelevance of its content.
    [rant]
    Vibes, APC

  • I need a program to send a mail when sap starts

    I need a program to send a mail (external mail) each time sap start or something similar.
    Does anybody know something about this ?
    Thank you .

    Hi,
    this is not a perfect answer, but it may help you,
    In SM04 transaction code, you will know which user is loged to SAP and which transaction is using, there we have a option to send the mails also
    have a look at it, and try to solve your problem
    Regards
    Sudheer

  • I have a spelling app that is stuck on the screen - it doesn't have any way to close it out, and when I split the screen and go to "Finder" to remove it, it says that it can't, because the program is still open. Please help.

    I have a spelling app that is stuck on the screen - it doesn't have any way to close it out, and when I split the screen and go to "Finder" to remove it, it says that it can't, because the program is still open. Please help.

    Paul,
    I'm sure this is the correct answer, but just switched to Apple, so am just an apple seed at this point! :~)
    How do I get to the Apple Menu?
    Thanks!
    KL

  • Protocol layer was unable to send a message - PLEASE HELP !!!!

    I have the Z10 and I am unale to reply to, or forward any e-mails that I receive on my corporate e-mail address.
    I can create and send new e-mails and I am receiving all my e-mails, but I can not forward or reply which is a basic requirement.
    Every time I try I get a message advising that
    "Protocol layer was unable to send a message"
    Please HELP!!!!!
    Antony.....

    Hi and Welcome to the Community!
    There are several public KB articles that deal with that error, depending on your exact circumstances. I suggest you go here:
    http://btsc.webapps.blackberry.com/btsc/microsites/microsite.do
    Search on your exact error message, then inspect the articles that result from the search to see which apply to your specific situation.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • When I am on my home wifi I can send e-mail.  When I am not on my home e-mail but on a wifi network or using the 3g network I cannot send e-mail.  HELP HOW TO FIX.

    When I am on my home wifi I can send e-mail.  When I am not on my home e-mail but on a wifi network or using the 3g network I cannot send e-mail.  HELP HOW TO FIX.

    I know this question is a few years old now, but I recently found myself having the exact same issues;
    Using my iphone or ipad at home created no problems at all, but I couldn't send e mails when away from my home network.
    I recently switched broadband supplier at home and set up a new e mail address, then my problems began!
    I openly admit I'm not great with technology and, to be honest, some of the answers provided on these forums confuse me more than the questions!
    But this worked for me:
    I went along the lines that the fault wasn't with my idevice but possibly with the broadband provider (in my case Plusnet) so I contacted their customer support.
    They referred me to the set up process shown below;
    From your home screen press Settings.
    From the setting menu, choose Mail, Contacts, Calendars followed by Add Account…
    From the Add Account… menu choose Other.
    Fill in your Full Name, Email Address, Password and Description and press Next.If you need help with these, there's more detail underneath the screenshot.
    Full name: Enter your name (or the name you'd like people to see when you send them email)
    Email Address: Enter the address you're setting up, this could be a Plusnet address ([email protected]) or a hosted domain address ([email protected])
    Password: Enter the password for your email address (I don't know what this is)
    Description: Enter a useful description of the email address you're setting up (e.g. Mum's email). You can put whatever you want here
    Press Next to continue.
    More settings will appear. Some will already be filled in.Enter the Incoming and Outgoing Mail Server details and press Next. If you need help with these, there's more detail underneath the screenshot.
    IMAP/POP This will default to IMAP - it's up to you which one you want to use (I don't know what to choose)
    Incoming Mail Server settings
    Host Name: For IMAP this is imap.plus.net - for POP, this is mail.plus.net
    User Name & Password: Enter the username and password for the email address you're setting up (I don't know what these are)
    Outgoing Mail Server settings
    Host Name: relay.plus.net
    User Name & Password: These are optional, but if you want to send mail while on the move (e.g. while connected to mobile or wireless networks), we recommend filling these in.Enter the username and password for the email address you're setting up (I don't know what these are)
    When you're finished, press Next.
    If the box shown below appears, press Yes (you may need to do this twice).
    After a minute or two, your email address will be set up and ready to use.If you chose IMAP when setting up you’ll be able to choose whether you want to use Notes (if you chose POP you’ll be taken back to the settings screen from step 2). Press Save when you’re done.
    That's all you need to do. To start checking your email, go back to your home screen and press Mail.
    Now I fully understand that it may be different for each broadband provider but the processes must be similar.
    The key appears to be in setting up the outgoing message server settings in step 5. Where it says "optional, but if you want to send mail while on the move (e.g. while connected to mobile or wireless networks), we recommend filling these in.
    http://www.plus.net/support/email/setup/ios-setup.shtml#pagetop
    Where it says "we recommend" I think it should read "you must fill these in"
    I went back to Settings - Mail,Contacts, Calenders - click on the offending account and click on the account shown.
    Under OUTGOING MAIL SERVER click on the server, in my case relay.plus.net, and click again to show the details. make sure you enter your user name and password and after a few seconds the account will verify and show a load of ticks.
    I tried this on my phone this morning while on 3G only. I sent an email to another of my addresses and immediately got the response that the message couldn't be sent as the recipient was rejected and the message had been placed in my Outbox. I followed the above steps and immediately heard the satisfying "whoosh" as my mail was sent. 10 seconds later another satisying beep as my e mail arrived at my alternate account.
    Hope this helps anyone else with a similar problem.

  • I have comcast internet. Now I cannot open any of my e-mails.Please help me correct this problem. Comast is not the problem.

    I upgraded to a newer version of firefox. My ISP is Comcast.
    I tried opening up my e-mails they will not open up.I contacted Comcast ,they told me there customers have no problems opening their e-mails.Please help me with this problem asap.
    The problem started after I upgraded to the higher version.
    Thank you,
    Arnold
    My phone is: 313 882-9785

    If it's a thin 1 pixel wide vertical line it's highly likely it could be caused by a defective LCD.
    One quick basic way to check is to note the position of the line. Then go to System Preferences, Displays, and lower the resolution. If ther line moves it's on the video and the logic board or video card if fitted is likely to be defective. If the line stays in the same position it's likely to be an LCD fault. Either way to have it repaired you'll need to visit an Apple store or AASP.
    The worst offender for this problem is the Late 2006 17" iMac. FOC replacement of the LCD used to be covered by a quality program, but it's now ended.
    Steve

  • I can not purchase from within the application clash of clans where necessary to answer the security questions that forgot their answers please help thank you

    I can not purchase from within the application clash of clans where necessary to answer the security questions that forgot their answers please help thank you

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps : https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57
    When they've been reset you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • Hello, why is all of my music on my iphone but only a few songs on my itunes on my laptop? it seems like its not updating on my laptop because it still says i have credit and i know i that there isnt any please help thanks

    hello, why is all of my music on my iphone but only a few songs on my itunes on my laptop? it seems like its not updating on my laptop because it still says i have credit and i know i that there isnt any please help thanks

    If they are iTunes purchases that you bought on your phone then have you copied them over from it to your computer's iTunes ? If that is the computer that you sync the phone to then you should be able to copy them over by connecting it and doing File > Devices > Transfer Purchases. Or (depending upon what country that you are in) you might be able to redownload them directly on your computer's iTunes via the Purchased link under Quicklinks on the right-hand side of the iTunes store homepage.
    In terms of your account's balance, have you tried logging out of your account on your computer (Store > Sign Out menu option) and then logging back in (it will change to a Store > Sign In option) and seeing if your balance changes ?

  • Help! I just put a US sim card (i am from Canada) and got a monthly pre paid plan, and when I went to restore the iphone, it didn't work. I can't find backup that i did right before the sim was changed. I really need the info that was there! Please help..

    Help! I just purchased a US sim card/monthly pre-paid plan (i am from Canada) as I am travelling in the states for a month, and when I went to restore the iphone, it didn't work. I can't find backup that i did right before the sim was changed. I really need the info that was there! Please help..

    Hold on,
    Have you talked to your carrier to confirm the unlock?
    What was the procedure you did to unlock the phone?
    Standard unlocking procedure once processed by the carrier:
    Backup in iTunes
    Erase the phone (ignore restore terminology here)
    Plug the phone to the computer and then launch iTunes
    Wait for unlock notification.
    Restore the backup.

  • HT1338 I have a Mac OS X Version 10.5.8. Just updated my iphone 5 & can not back anything up from itunes because my software on my mac is not up to date. What software should I now have to be up to date? Im so confused by all that is offered! PLEASE HELP

    I have a Mac OS X Version 10.5.8. Just updated my iphone 5 & can not back anything up from itunes because my software on my mac is not up to date. What software should I now have to be up to date? Im so confused by all that is offered! PLEASE HELP ME.

    Hi
    You need to upgrade to the next OS 10.6 Snow Leopard by purchasing the DVD online.
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    and once installed, use Software Update
    - to update to 10.6.8
    - and update your iTunes.

  • HT4095 A video I paid will not download. I keep getting download error. I have an iPad2 and I have downloaded other movies since buying the one that won't. Please help.

    A video I paid will not download. I keep getting download error. I have an iPad2 and I have downloaded other movies since buying the one that won't. Please help.

    I would restore the iPod to factory defaults/new iPod on your computer and start over. It appears the iPod is associated with another account.  Any media that came with the iPod does not belong to you and di not transfer with the iPod hardware.

  • I got an internet connection on my phone. After getting the internet connection, I was unable to make a call or check the missed calls that I got. Please help me resolve this problem.

    I got an internet connection on my phone. After getting the internet connection, I was unable to make a call or check the missed calls that I got. Please help me resolve this problem.

  • Whenever i try to install or update my mac to OS X Yosemite it asks for my apple ID and then takes me on to a page to fill in a credit card information form. However i don't like to share information like that online can someone please help me ?

    Whenever i try to install or update my mac to OS X Yosemite it asks for my apple ID and then takes me on to a page to fill in a credit card information form. However i don't like to share information like that online can someone please help me ?

    Not really, but you did need that when you got your Apple ID.
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card

Maybe you are looking for

  • Urgent-problem with wrapper function call in terms of argument varchar size

    Problem: SQL> select * from table(cmws_add_activity_reason_F_1( 1733201, 3234, 23, 2 NULL,NULL,NULL, 3 'Gen The The The The The The The The The The The The The The The The The The The The The The The The The The The The The The The The The The The Th

  • Startup problems w/ Power Mac G4 (QuickSilver 2002) M8667LL (dual 1 GHz)?

    Startup problems w/ Power Mac G4 (QuickSilver 2002) M8667LL (dual 1 GHz) Starts up with bong and then a long wait then screen comes on with old time smiley Mac and spinning beach ball then another long wait and then OS X loading bar and then a panic

  • MS SQL Server Authentication

    How can I allow only users in my MS SQL server database to log into my simple chat room? Thanks

  • Re-enter Premium for new subscribt date

    Had a month free Premium but cancelled today on the 26th so that the monthly fee is withdrawn from this date. I get a cancellation confirm on my email but spotify doesnt enter free mode... how long can that take? It is first after that I can subscrib

  • LR 4 Camera Profiles Limit?

    Is there a limit to the number of profiles that can be added to Camera Profiles in LR4? Presently there are 9. I added one via the Library/AppSupport/Adobe/ACR/Camera profiles route where it appears. It does not appear when Camera Profiles are opened