Using javamail to send automatic mails to an smtp server

hello every body
i'm trying to develop an application which will be implemented in a entreprise network (it's a project for my studies).
this application will be web oriented and will consist on sending automatic mails to persons using the mail server of the entreprise.
so i don't really know how to act, because i have to test my application by simulating the use of the mail server and i don't know how tu use a mail server for that, neither how to define the sender (because the operation will be automatic by a program), in other terms, i'm trying to send mail in a local network wich is connected to the internet.
thanks for ur answers

You can find "simulated" mail servers, good for
testing, but it's probably not worth the effort.
Just use your real mail server.
Best would be to create an email address on your
local mail server and use that as the From address
for your automated mails.
Don't forget to read the JavaMail FAQ.

Similar Messages

  • How to send automatic mail and put attache file on batch file ?

    how to send automatic mail and put attache file on batch file ?
    START MAILTO:[email protected]?SUBJECT=PHONE%CALL^&BODY=Testing

    Hi,
    Do you want to use a batch file to create new email message (including recipients, subject and email body) with attachments? If so, I'd recommend you post your question in the Scripting Guys forum for further assistance:
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Please feel free to let me know if I've misunderstood something.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Using Safari to send HTML Mail message but Mail keeps dropping images?

    I'd like to use Safari to send html Mail messages, but when I click on File>Mail Contents... Mail opens a new window but my graphics are gone. (I'm creating the html pages using MS Word for the Mac.) I get a flash of the graphics for a second, and then they are replaced by a little blue lego. Any ideas? I've tried all kinds of mail preferences but nothing seems to help.

    Figured it out (at least one way): had to load the image to a server and then add the image as a link only (uncheck "save picture with document" box).

  • Using Gmail in iPhoto and cannot find any of my groups to email.  I have at least seven or eight groups that I email, each containing over 50 addresses. Is there a way to locate my email groups using iPhoto to send out mail in Gmail? Using version 9.5.1

    Using Gmail in iPhoto and cannot find any of my groups to email.  I have at least seven or eight groups that I email, each containing over 50 addresses. Is there a way to locate my email groups using iPhoto to send out mail in Gmail? Using version 9.5.1  (902.17) OS is Mavericks 10.9.1.

    Your question and description is not very clear to me, so hopefully something here will help:
    1. Gmail is a service not an app or a place. So you need to access the service with an app - that can be iPhoto, Mail, Outlook or any other mail client, or even a Web Browser like Safari or Firefox.
    So you can't "go to GMail" as you write, but instead you go to an application set up to use the GMail service.
    2. iPhoto is not a mail client. It's a handy way to email pics to Grandma, but for what you're doing you need to use an app that supports all of the Gmail service. iPhoto doesn't. There is no way around that.
    3. How to send to groups will vary depending on what app you use to access the GMail service. All of these apps can receive photos from iPhoto, either - as in the case of Mail and Outlook, via the Share function - or, in the case of all the rest - via a Media Browser.
    For help sending to Groups using any of these other apps you need to ask omn their respective forums. But the workflow is quite simple:
    Using Mail or Outlook set in the iPhoto Prefereneces:
    1. Select the pic(s) you want to share.
    2. Choose email from the Share function
    3. Make your selections re size etc
    4. The email opens up in Mail or Outlook
    - from there you need to figure out how to use the email client.
    Using any other app:
    1. In the mail app create a new email
    2. Click on the Attach button or link
    3. Use the Media browser to select the pic(s) you want to send
    4. Attach them
    - from there you need to figure out how to use the email client.
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • BO4.1 SP2 use Publication to send e-mail

    When i use Publication to send e-mail, aproblem occurred. I want to set the subject of e-mail like   '2014-08-21  XXXXXX',but when i use placeholder(Date Time ) ,the subject of e-mail is 2014-08-21-09-16-21 XXXXXXXX.

    Hi,
    Use %SI_STARTDATE% to display date only.It will work in publication however it is not listed in the default place holders in BO.
    Regards,
    Amit

  • Can't Send Mail Via HughesNet SMTP Server

    After installing 10.5 I find that I can receive mail from my ISP (HughesNet) but I can't send mail through the smtp server. I've tried every setting possible and even duplicated the settings off my wife's 10.4.10 iMac and I still can't send mail. All I see is that the smtp service is "Offline."
    Fortunately, I have a .Mac account so I can send mail using that smtp server. But I'd like to be abel to use my HughesNet server.
    Does anyone have any suggestions?

    My mom uses RoadRunner by Time Warner. She was able to receive email using Leopard and Mail but not send. SMTP server was the big problem like everyone else here experienced. We finally were able to get it to work using many ideas here. What we did:
    1) Delete com.apple.mail.plist from the User/Library/Preferences folder (BACK UP YOUR EMAIL FIRST)
    2) Open Mail and create a new account but disable the automatic set-up feature, put your info in manually.
    3) Uncheck " Use only this server" from the outgoing mail
    4) Under the Advanced tab on Mail Prefs "port set to 25", Uncheck "SSL" box, and uncheck "Use Authentication"
    5) Now hit Create
    It took Mail about 20 minutes to contact the SMTP server, but it did and now I can send and receive Mail without any problems on her computer.
    Bad Apple...stop criticizing MS and Vista when your own house is not in order yet. Hope this helps someone out there.....

  • Can not send be-mail os10.9.4 server offline !!

    can not send be-mail os10.9.4 server offline !!

    Hey there mikeneiris,
    It sounds like you are not able to send any emails because the account is showing as offline. I recommend these steps from the following article to help you get that going again:
    Mail (Mavericks): If a mailbox is offline
    http://support.apple.com/kb/PH14925?viewlocale=en_US
    To take an account online, click the lightning bolt icon. Or choose Mailbox > Online Status > Take [account name] Online, or Mailbox > Take All Accounts Online.
    If you can’t take an account online, make sure you’re connected to the Internet. If a warning icon appears after the account name, click it for more information.
    Use Connection Doctor
    Some mailbox names can appear dimmed if you don’t have permission to access them, such as “public” mailboxes on a server, or if the mail server is unavailable.
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • Write error. [Error sending mail message to SMTP server. Return code: [].]:

    Hi ,
    I am getting the below error when scheduling a report which is larger in size in excel format.
    write error. [Error sending mail message to SMTP server. Return code: [].]: [CrystalEnterprise.Smtp]  
    The same error does not come up when sending the same report in XLS format using outlook.
    Can some one confirm if this error is because of the size of the report as I see a different error in XIR2 incase the size the exceeds the email server limit.
    ~Neethi

    Hi,
    this could be
    Maybe you have different limits for service smtp account (which the BO Server should use) and User smtp accounts.
    Thats why you can sent it via outlook and not from the BO Server.
    Regards
    -Seb.

  • /usr/bin/mail buggy or smtp server picky?

    I want to use mail to send email quickly from my terminal and decided to use msmtp as my smtp client to keep things light and straightforward.
    However, when I use /usr/bin/mail to send an email to [email protected], my smtp server (mail.messagingengine.com if you are interested) queues the email that was delivered by my /usr/bin/msmtp client fine (I get an OK for queue message), but after a couple of hours I get an NDR (Non Delivery Report) saying that my message couldn't be sent and will be retried until ultimately I get an NDR that my message couldn't be delivered.
    After some debugging, I realized that the reason the smtp server was having trouble is that my message didn't contain the From: header. Since the from address is already specified in the envelope upon SMTP-initiation, it seemed to me illogical that the smtp server couldn't just use that email.
    So I opened a ticket with those guys over at fastmail.fm, and they told me that the problem was not with the SMTP server, but with the mail client, which creates "invalid" messages (i.e. not sending the From: header). Since I trust my provider to know his stuff, here's my question:
    How can I tell /usr/bin/mail to insert a specific From: header?
    Thanks!

    Hello fukawi2,
    my ~/.mailrc contains one line:
    set sendmail=/usr/bin/msmtp
    Here's what happens when write an email using /usr/bin/mail from the mailx 8.1.1-7 package:
    [x@eee ~]$ mail [email protected]
    Subject: hello
    Another test
    EOT
    Here's how /usr/bin/mail passes my email to msmtp:
    /usr/bin/msmtp -i [email protected]
    To: [email protected]
    Subject: hello
    Another test
    Here's what my msmtp config looks like:
    #~/.msmtp
    account fastmail
    from "[email protected]"
    host mail.messagingengine.com
    auth on
    tls on
    tls_certcheck off
    user [email protected]
    password "*"
    logfile ~/msmtp.log
    Here's what the msmtp log shows when I send the email:
    nov 18 00:28:41 host=mail.messagingengine.com tls=on auth=on user=[email protected] from=[email protected] recipients=[email protected] mailsize=41 smtpstatus=250 smtpmsg='250 2.0.0 Ok: queued as C3A00A7B7' exitcode=EX_OK
    I will send the NDR from the SMTP server when it arrives (takes a couple of hours) if you'd like to inspect it.
    Maybe ssmtp has a way to insert a From: header automatically, I haven't taken a look at it. Maybe even msmtp has a way to do that, even though I haven't found that option in the man pages.
    What I am trying to say is, if the /usr/bin/mail program cannot be configured to create a valid rfc-compliant email, then using an intermediary mail transport agent like ssmtp would only be a workaround but not a permanent fix. Hence my suggestion to replace mailx with a compliant, working package in the arch core install.
    Any ideas on how to proceed from here?
    Last edited by awayand (2009-11-17 23:37:45)

  • Send iCloud email from alternative smtp server?

    How do I send iCloud email from alternative smtp server? The setting is 'greyed out' on my iPhone so I cannot tell iCloud to use another server.
    The reason is so I can have my outgoing email appear from my own domain email address rather than my me.com address. Mobileme would allow this - and Mail on the Mac does allow it, but the iPhone under iOS 5 seems not to allow it....
    Any ideas?

    I have spent about 4-6 hours working directly with folks from Tim Cooke's office, various support levels, and through them their engineers.
    As much as I tried to convince them their logic is flawed, the engineers for iCloud come back and say this is expected behavior because somehow it helps secure iCloud from being a spam source. The fine and helpful gentleman from Cooke's office now understands how it is a MobileMail.app client issue, having nothing to do with iCloud servers (because we are in fact trying to bypass their servers) still totes the "it's expected behavior" line from the server engineers.
    I have implored him to follow up with the iOS MobileMail app programmers and not the iCloud programmers. I am hopeful he will. Until then you have to choose between having iCloud push and losing your online identity, or losing push email and keeping your preferred address.
    Fun to try: turn off all smtp servers. Send email. Gets stuck in outbox. Turn on your preferred smtp server. That one email will use your preferred alternate address, but subsequent ones revert back to the old .me.com smtp servers. Personally I believe this points to a client programming error more than reinstating a preferred behavior. Aggravating!
    I spend $500 on a new phone. Google takes away my exchange client ability and apple makes me choose push email vs outgoing email address.

  • Forward mail to other SMTP server when user is unknown

    Hi There,
    At this point we are migrating our mailserver from groupwise to Exchange 2007 and at the same point we are connection the new domain  in the forrest from a other school. All goes well but know there is a small issue that we have to fix. The Exchange server from the other school send's all message's for @grundel.nl to our new exchange server but there aren't users. There are two sollutions to our problem (I think) but I need to know what exchange can do for me.
    1- Our mail goes to the new exchangeserver and when there is a user that the server doesn't know he forwards the mail to our Groupwise server (through SMTP). Is this possible and how can I configure it?
    2- The mailserver from the other school sends the mail to Our Groupwise server direct. This is difficult because we are in one forrest and exchange see's that the grundel.nl is configured in sites and servers.  Can Exchange bet configured to send mail for our domain to a SMTP server instead of our exchnage server and how can I configure that?
    Sollution 1 would be the best so we gen migrate a bit easier.
    Thanks,
    Marcel
    PS: All Exchange server's are 2007 SP2.

    and if i am having "recipient not found" for some users ?
    i have the same situation and mostly all mail goes normally, except for some users.
    It smtp configuration for user is [email protected] but if i send mail to [email protected] (the same site, same server, but i have  smart host value for this domain ) - mail deliver to user exchange mailbox locally ([email protected]) and not forwarded
    to another host.
    Another users goes normally. how can i resolve this problem ?
    Be real
    really need some help
    Be real
    This question is already marked as answered so you should start a new thread including as much information as possible.
    Cheers, Steve

  • Please help me to use javamail to send mail in servlet program

    hi
    i want to send simple mail from user [email protected] to user [email protected] using servlet program
    i can't compile the javamail demo program servlet "JavaMailServlet.java".
    i have this exception
    Note: SendMailServlet.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    i don't no how to do
    please help me if you have code
    thank's

    Given that you're having problems with your [url http://forum.java.sun.com/thread.jsp?forum=43&thread=536278&tstart=0&trange=30]demo mail code as well as your demo servlet code, perhaps you would be better served by learning about JavaMail, servlets, and perhaps Java in general (for example - the meaning of deprecated). Then you may be able to build your own servlet for handling mail or at least will be able to revise the demo code found elsewhere.
    Of course, if the purpose is really not to learn how to use Java, JavaMail, servlets, etc. but to simply create something that works then you could always hire someone to write the program for you.
    This is not intended to be rude or anything - just an observation and some food for thought.
    ∞ brewman ∞

  • Sending automatic mail using JSP or Servlet

    hello,
    i was just wondering if anyone out there knows how can automatically send emails to client from my application after receiving thier email address. the email address is received from a form and i want my application to automatically send a structured email to the client as soon as they click the send button. i am using JSP and tomcat as my server. any help will be appreciated

    You must create a class that sends the mail:
    A code example would be like this:
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import java.util.*;
    public class MailSender {
         public void postMail(String smtpsrv, String recipients[], String subject,
                   String message, String from) throws MessagingException {
              boolean debug = false;
              //Set the host smtp address
              Properties props = new Properties();
              props.put("mail.smtp.host", smtpsrv);
              // create some properties and get the default Session
              Session session = Session.getDefaultInstance(props, null);
              session.setDebug(debug);
              // create a message
              Message msg = new MimeMessage(session);
              // set the from and to address
              InternetAddress addressFrom = new InternetAddress(from);
              msg.setFrom(addressFrom);
              InternetAddress[] addressTo = new InternetAddress[recipients.length];
              for (int i = 0; i < recipients.length; i++) {
                   addressTo[i] = new InternetAddress(recipients);
              msg.setRecipients(Message.RecipientType.TO, addressTo);
              // Setting the Subject and Content Type
              msg.setSubject(subject);
              msg.setContent(message, "text/html;charset=utf-8");
              Transport.send(msg);
    You 'll find out that its easy to understand the code.
    I advise you not to change this code.
    I also include an example of how to right the JSP code:
    <%
    MailSender MS = new MailSender();
    try {
         MS.postMail(server, recipient,"Your E-mail Title", "BODY content", from);
         } catch (MessagingException e1) {
                        e1.printStackTrace();
    %>
    This JSP code follows the pattern of the above class
    Hope to help you
    Cheers!!!

  • Can anyone explain what the other section section in the HDD usage description is for ? I recently used iphoto to send a mail and this "other "section inrease the usage by about 1GB....any ideas why ?

    Can anyone explain what the "other" (yellow colour) section in the HDD usage description is for and what it does.It is under the about this mac section and storage option?
    I recently used iphoto to send mail with photos attached and this "other" section increased by about 1GB. The mail size was around 900KB.....any ideas ?

    Shurig wrote:
    Thanks gor replying,,,this is my first time on this site.
    Any idea why the "other" continues to increase. I have just got got my mac so no new apps installed yet only been using it for mail and web browsing. I tried the iphoto mail last night and noticed the the "other" section had increased by 1GB which I thought was rather larger. Do you know what this setion actually does ?
    Also do you know if it is possible to delete the iphoto emails.
    All of your 'stuff' that is not Music Movies Apps Backups or Photos is in Other, that means all your emails, all your files etc, why don't you just leave well enough alone, this is not windows and doesn't need tinkering with,

  • Sending mail regardless of SMTP-server.

    Hallo
    A lot of my friends who - unfortunantely uses PC - can send mail regardless of where they are situated and they dont have to change there SMTP-settings. I´ve tried to make it work by making the same settings as I use for outgoing mail and asked my mac use my password. But it doesnt work:-(... Can anybody explain this? What am I doing wrong?
    Thanks!
    Mikkel

    Thank you VERY much for your reply.
    The message that appears when I send something is:
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    MESSAGE delivery failed.
    The sender address [email protected] was rejected by the server.
    The server response was: 5.1.0 Authentication required.
    You can try to send using a different server. All messages will use this server until you quit or change your network settings.
    Send message using: smtp.gis net
    smtp.mac.com
    Edit Message Use Selected Served Try Again Later
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Later today I will try to follow the procedure you suggested and post a reply.
    F.Y.I., I previously changed the settings needed by my previous server to ones required by Comcast.

Maybe you are looking for

  • SQL NLS_UPPER not working correctly for French?

    Hi, I have a database containing text in a large number of languages, and am trying to convert characters to uppercase based on their language, but am hitting a particular problem with French. In French, accented characters lose their accents in uppe

  • Access issues while inserting data in a table in same schema

    Hi All. I have a script that at first creates and then populates a table. My script used to run fine in production environment till few hours back. But all of a sudden, it is popping up error while inserting data into the table . Error message - "Ins

  • Task list creation in plant maintenance.

    Hi All, I have the function module /ISDFPS/TASKLIST_CREATE which was used in my program under one more Z function module, we have a XI integration also here earlier we were using service pack SP10 so this program was working fine as integration with

  • Cant install apps?

    Okay, so I wanted to install vine (an app) but I can't. The reason why is because the free button (the app is free) is faded out so I can't download it. I tries so many different things but still I can't install certain apps. When I try to click on t

  • DMVPN/preshared key configured and device stolen

    Hello, I have a question on DMVPN solutions where device is already configured with a preshared key and expected to be a part of a network once the device is fired up. Now what if this device (e.g. router) is stolen and plugged to the Internet? I bel