Malicious e-mail testing

Maybe it's because I'm frugal...but couldn't you just setup a dumby account on something like Yahoo and set up your own "phishy" e-mail? Of course, you wouldn't attach a virus but it will be a test? You could get creative by attaching a batch script to write a log if the attachment is opened on a network drive or something. 
Best thing to do is to setup an anti-spam SaaS solution to zap these attachments and e-mails before they hit your server. Then have an endpoint solution to zap anything that makes it through.

Hi all,
I'm the only IT guy in a small company based in London. Currently we seem to be receiving more and more malicious e-mails, mostly containing word documents that have Macro's which can obtain bank details and other personal information.
I've been asked to run some software to test the staff's know-how when it comes to receiving this type of e-mail. Do any of you know of any software that will enable me to do this? As we are just a small business, the cheaper option would be the most convenient.
I look forward to your guidance.
This topic first appeared in the Spiceworks Community

Similar Messages

  • E-mail Testing

    Hi,
    I am little confusing in testing my Anything to E-mail scenario. When I create the Receiver Adapter, I was asked for interfaces etc, .
    I know how to configure the Sender/Receiver Mail Adapter. In the Integration Directory, what do I need?.
    I am assuming I need only receiver Adapter, do I need anything else?. Please provide some design tips.
    Thanks,
    Raj.

    Hi Raj ,
    These are the following configurations in IR and ID .
    Design Time
    1. Create a datatype as per your source structure .
    2. Create the corresponding MT for it .
    3. Create a External Definition for the receiver. As your receiver is a mail you can use the SAP note :784024 XSD in your target which can be downloaded from the service Marketplace.
    4. Create MI for the source and target .
    5. Create Message mapping and map the fields as desired .
    6. Create the Interface mapping .
    Configuration time
    1. Create a CS and assign the BS to your scenario .
    2. Configure the Communication Channels as required and choose the Transport and Message protocols accordingly .
    3. Create Receiver Determination and Interface Determination accordingly.
    4. Create Sender Agreement ( Source System and its CC) and receiver Agreement ( Target System i.e Mail and its CC) .
    Thanks & Regards,
    Ashish Sharma .

  • Mail testing through ESMTP

    hi,
    I have cisco ironport C370. we configured and try to send mail through ESMTP. I got the following error
    Your message did not reach some or all of the intended recipients.
          Subject:  test mail @ 3:31 PM
          Sent:     1/20/2011 3:32 PM
    The following recipient(s) cannot be reached:
          ( to address) on 1/20/2011 3:32 PM
                There was a SMTP communication problem with the recipient's email server.  Please contact your system administrator.
                (from address) #5.5.0 smtp;550 #5.1.0 Address rejected.>
    Pls give solution to solve the issue.

    Looks like the other mailserver did not like the recipient address or domain. Did you sent the message to an existing account? And is the error message from your internal mailserver that tries to reach the IronPort, or did the IronPort receive the error from the mailserver it wanted to deliver?
    Andreas

  • Margin errors in HTML e-mail test

    In a previous post, I had asked for help viewing HTML mail campaign pieces and got the suggestion to try Email on Acid. I did and this was a scream to watch. The results for Outlook (every issue) was less than stellar. However, Gmail reveled the worst results. I use OS X Mail and everything looks great there. The test spits out critical errors. One is that Photoshop doesn't supply a <!DOCTYPE> declaration, but that's easy enough to fix. The consistent errors in Outlook were:
    MARGINHEIGHT- MARGINHEIGHT attribute is not supported in BODY tags
    Line: 7
    and
    MARGINWIDTH - MARGINWIDTH attribute is not supported in BODY tags
    Line:7
    Any ideas what this is and how to fix?
    http://doncamacho.com/dyk_assets/DYK-2012-Template.htmlhttp://
    Thanks,
    Bill Rzasa

    Short answer.  Don't use Photoshop or any graphics app to generate HTML code for you. 
    The code Photoshop generates is deprecated.  Change the following
         <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    To this:
         <body>
    Use graphics apps for images only.  Use an HTML editor to create your HTML Emails. 
    FYI: For security reasons, many web mail users don't see graphics.  When I look at your HTML Email without images, I see nothing because there is no real text on the page.
    HTML E-mails, What you need to know.
    http://alt-web.com/Articles/HTML-Emails.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Malicious incoming mail

    Greetings,
    We have an Exchange 2010 Organization of 500 mailboxes, with no Mail Security Appliance solution nor Edge Transport protection except the local Anti-Spam that is installed in all computers, so one user mailbox received an email from [email protected]
    (this address does not exist in Exchange), the email contains a link to a virus.
    So we are afraid that the user or any other users receive this malicious email using a valid exchange email address !!
    Could someone explain the situation, propose a solution, investigation techniques to identify the incoming source, how to block this kind of emails, and how this could be done ?! .......
    Thanks in advance.
    Redouane.
    Redouane SARRA

    Explain? Well, it is possible to spoof (imitate) the address of the recipient so it appears that the email comes from their own domain. Of the top of my head, I cannot explain the mechanism further but that is how it works.
    Solution? Besides the antispam (and antivirus?) on the client machines, you could:
    1. Use an online antispam/antivirus solution
    2. Install a 3rd party product on the mail server.
    3. Use the builtin Exchange HT antispam feature (I don't believe it has antivirus though -???):
    This is how to install it -
    https://social.technet.microsoft.com/wiki/contents/articles/13918.how-to-install-antispam-agents-in-exchange-2010.aspx
    Oh, investigative techniques. I believe you can see the real address in the header of the message.
    There are many articles about this on the Internet. If you do a search with these terms, you should find one article:
    "What Email Headers can Tell You About the Origin of Spam"
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Free SMTP server for Java mail testing

    Hi all,
    Are there any free SMTP servers that can be downloaded from the Net for Java mail. Thanks.
    Regards
    Ram

    I am sorry ..may be my question was not very clear. I do not have am SMTP host. I need an SMTP host to route emails...is that possible.
    If I have an SMTP host on my machine, then it will act as a router to route messages to other email severs like yahoo or hotmail.
    So the "from" will be a user from the SMTP host.i.e my machine user and the "to" will be some email "[email protected]" or "[email protected]".
    Is it posssible to route emails directly to any Yahoo or hotmail server using just java mail client?
    Thanks
    Regards
    RP

  • Error in CF Admin mail test

    Hello all-
    I've got a new install of CF 11 on Windows Server 2012 R2.  For the first week or so everything was fine, but after a while my email stopped going out.  I looked at the pages generating email, and there was a CF error.
    So I went to the admin to verify the connection- Boom- error in the admin!  Every time I attempt to verify my email settings, I get an error.
    I do not believe there were any changes made to the server between the time email was working, and when it died.  Potentially a Windows Update, but that is about it.
    Any ideas on this one?
    Thanks - Karl

    Karl, is your problem still happening?
    If so, are you sure that your web site (is it IIS) is set so that the CFIDE it points to is the one inside CF11?  We see from the screenshot you shared that inside the stack trace it points to the page as running in some /CFIDE folder (as if it’s the root of a file system—and it’s odd, because there’s no drive reference, which would be there normally on Windows.)
    Normally, it should point to the coldfusion11\cfusion\wwwroot\CFIDE folder, which is where CF11 puts that folder by default.  If your web site is pointing at some other folder for that, it could simply be that your Admin was using a different version of code for that mail settings page than CF11 is expecting you to use.
    Let us know if that helps.
    /charlie

  • How to Test Mail's Trainable Filter?

    In the Apple Support Discussions topic No Junk mailbox in Training mode? a question arose regarding how to test if the trainable filter (the filter that evaluates the "Message is Junk Mail" condition) is evaluated independently of the other conditional tests of the Junk Filter rule -- IOW, if some other test condition in the Junk Filter rule, like sender is not in the address book, evaluates to false, does the "Message is Junk Mail" test which follows it in the rule's list of conditions ever get evaluated?
    A proposed test for this involved resending to yourself a message that Mail had previously marked as junk using the "Message > Send Again" function of Mail. It has been pointed out to me that this probably isn't a valid test because "Message > Send Again" doesn't send the original message in unaltered form (there are substantial changes in the header info regarding sender, path, etc.) & thus the filter may not consider the resent message as junk, even if it were to evaluate it.
    So, for testing purposes, does anybody have a suggestion about how to resend (or fake resending) a received message to myself without altering its header info?

    What matters is whether the Message is Junk
    Mail condition would still evaluate to true
    regardless.
    That depends on what you are trying to determine & if the test produces decisive results.
    For instance, consider tests with the standard Junk Filter automatic settings & no other rule involving "Message is Junk Mail" in the list. A test is performed in an attempt to determine if the filter's conditional tests are performed in the indicated order only until one evaluates to false.
    "Send Again" should not cause the "Message is Junk Mail" test to be evaluated at all, since in this case the sender is oneself & the Junk Filter should exit as soon as the 'sender not in Address Book' test is evaluated.
    Yet, when I try this with a message (correctly) marked as junk when originally received, the resent version is still marked as junk, & this happens not just on my on Mac but on the few others I have checked as well. I have tested with only a limited number of junk messages because on the other Macs the owners do not keep them for long & on my own I do not get that many (AOL is my primary account & has excellent spam filtering), so I would love to know if readers of this topic see similar results.
    BTW, I should mention here what might be a potential hazard of using "Redirect" for testing with "real" spam: As I hope everybody knows by now, it is a bad idea to enable automatic loading of remote html images because doing so can alert spammers one's email address is valid. In one case, when I tried the "Redirect" method on my own Mac, AOL refused to accept the redirected message, possibly because of AOL's spam filters. At that point, Mail displayed the message, asking if I wanted to try sending it from another account, edit it, or what. Even though I have the option disabled, Mail loaded the original's remote html images along with its other content. I don't know if that is a design feature of Mail, a problem with just my Mac, particular to AOL, or what, but I want readers to be aware of it, just in case.
    Anyway, for this reason I have since confined myself to testing with "Send Again," which seems safe in all cases, & mostly to testing only on my on Mac, just in case it is not.
    Back to the "so what" aspects of this topic: It may be that the "Message is Junk Mail" test is sometimes treated differently from the other conditional tests in the Junk Filter in that it may be evaluated first or even if other tests before it evaluate to false. This makes some sense as a design feature in that even if the Junk Filter's automatic mode action isn't performed, it gives users more training opportunities. It may be a bug. It may just be something particular to my Mac. It may be something else, perhaps having to do with trusting junk headers, or something more subtle as yet unconsidered.
    In any event, the point is holding all variables save one constant in any single "black box" test of a multi-variable system is a necessity for definitive results because variables may be interdependent. Because of this, the ability to resend to oneself the same message in unaltered form would be useful for a variety of tests, so I would still like to know if anyone has any ideas about how to do this.
    iMac G5/2.0 GHz 17" ALS (Rev B)   Mac OS X (10.4.7)   512 MB RAM, Kensington Trackball

  • Strange email content received when test email mailer on RedHat 3 -- HELP

    Hi,
    Please have a look at the two email contents below, they are sent by java mailer when I click the test mailer button in workflow manager, and they are actually the same message, but one of which has full content, the other doesn't seem to like picking up the &SUBJET and &BODY.
    PS: This is a test mailer action (CLICK ON TEST MAILER BUTTON WITHIN WF MANAGER), I do not need to specify any values for the email message content, the &SUBJECT and &BODY are not attributes in my worflow processes.
    1. Email content sent from notfication mailer on WINDOW 2003 SERVER:
    SUBJECT: Action Required: Message for Testing Notification Mailer
    From: Oracle Workflow
    Priority: Normal
    Oracle Workflow Notification Mailer Test in System
    adc055.adc055.admin.abdn.ac.uk_Oracle Workflow - Successful!
    Please respond to acknowledge this message.
    Please click on one of the following choices to automatically generate an
    E-mail response. Before sending the E-mail response to close this notification,
    ensure all response prompts include a desired response value within quotes.
    Acknowledgment for the message
    Result: Acknowledge Request Information
    2. Email content sent from notfication mailer on LINUX REDHAT3 Enterprise
    Edition:
    SUBJECT: Action Required: &SUBJECT
    From: Oracle Workflow
    Priority: Normal
    Oracle Workflow Notification Mailer Test in System
    babarAS.babar.admin.abdn.ac.uk_Oracle Workflow - Successful!
    Please respond to acknowledge this message.
    Please click on one of the following choices to automatically generate an
    E-mail response. Before sending the E-mail response to close this notification,
    ensure all response prompts include a desired response value within quotes.
    &MAILTO
    &HISTORY
    If you make a comparison between the two contents of a same notification
    message perhaps you will notice the difference between them. SEE that &SUBECT,
    &MAILTO & HISTORY don't pick up the real value.
    ANY IDEA?
    Thanks

    Hi Platomey, I have the same problem with my Blackberry 9360 and so do several others who have posted on this site since around February 2012, but so far no answer from anyone on how to fix it.  I tried uninstalling & re-installing Hotmail but it made no difference.  My service supplier is Orange but I've seen the same problem on a Vodaphone forum, so it doesn't seem to be to do with the service.  Help us someone please!
    http://supportforums.blackberry.com/t5/BlackBerry-Curve/Blackberry-9360-duplicate-wording-in-my-emai...
    http://supportforums.blackberry.com/t5/BlackBerry-Curve/Duplicate-text-in-an-email/td-p/1554343
    http://supportforums.blackberry.com/t5/BlackBerry-Curve/Email-content-duplicates-itself/m-p/1556165/...
    http://supportforums.blackberry.com/t5/BlackBerry-Curve/Sent-email-content-is-duplicated-when-receiv...

  • Error e-mailing a test plan

    I select a test plan and then click 'Print or E-Mail Test Artifacts'. I select the defaults, Click Email, enter a username and I get TF400969: An error occurred attempting to send the email. Retry at a later time."
    Using TFS 2013 Update 3. Screenshots below.

    Hi Jamie,
    Firstly, I don't think your issue is related to your TFS configuration with SMTP server, as you can send the test email correctly. And I don't think your issue is related to your IE settings either, as emailing query result works fine.
    Could you please check the event viewer on your client machine to see if there is any error message useful?
    By the way, I noticed that you set configuration to also email children suite and as well as links, attachments, and associated automation. How about you start from emailing a top level test plan without adding these attached files?
    Thanks.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click  to participate the survey.
    Here's an update. I found this in the event viewer on the Application Tier server: 
    TF53010: The following error has occurred in a Team Foundation component or extension:
    Date (UTC): 3/24/2015 7:36:04 PM
    Machine: xxxx
    Application Domain: TfsJobAgent.exe
    Assembly: Microsoft.TeamFoundation.Framework.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v4.0.30319
    Service Host: 
    Process Details:
      Process Name: TFSJobAgent
      Process Id: 6564
      Thread Id: 7640
      Account name: xxxx
    Detailed Message: TF271001: An error occurred while attempting to send an email notification to the following address: providence. Further email notification errors that occur within the next five minutes might not be logged. Verify that the email notification
    settings are correct in the Team Foundation Administration Console.
    Exception Message: The specified string is not in the form required for an e-mail address. (type FormatException)
    Exception Stack Trace:    at System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index)
       at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)
       at System.Net.Mail.MailAddressParser.ParseMultipleAddresses(String data)
       at System.Net.Mail.MailAddressCollection.ParseValue(String addresses)
       at Microsoft.TeamFoundation.JobService.Extensions.Core.NotificationJobExtension.SendEmail(TeamFoundationRequestContext requestContext, TeamFoundationNotification notification, TeamFoundationIdentity subscriber, TeamFoundationIdentity recipient)

  • Need help with PHP mail script [was: Can someone please help me?]

    I'm trying to collect data from a form and email it.  I'm using form2mail.php and the problem is that the email is not collecting the form info and it has the same email address in the From: and To: lines. I'm really stuck and would appreciate any help.
    Here is the HTML code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Contact Us</title>
    <style type="text/css">
    <!--
    .style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
    .style2 {
    font-size: 14px;
    color: #000000;
    body {
    background-color: #FFFFFF;
    body,td,th {
    color: #CC3300;
    .style3 {font-size: 14px; font-weight: bold; }
    .style6 {font-size: 18px}
    .style7 {font-size: 16px}
    .style8 {font-size: 16px; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style9 {font-size: 16px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style10 {color: #000000}
    -->
    </style>
    </head>
    <body>
    <div align="center"><img src="nav2.jpg" alt="nav bar" width="698" height="91" border="0" usemap="#Map2" />
      <map name="Map2" id="Map2">
      <area shape="rect" coords="560,9,684,38" href="accessories.html" />
    <area shape="rect" coords="456,8,548,38" href="contact.html" />
    <area shape="rect" coords="305,8,435,40" href="photog.html" />
    <area shape="rect" coords="187,9,283,39" href="services.html" />
    <area shape="rect" coords="81,10,167,39" href="aboutus.html" />
    <area shape="rect" coords="5,10,68,39" href="index.html" />
    </map>
      <map name="Map" id="Map">
        <area shape="rect" coords="9,9,69,39" href="index.html" />
        <area shape="rect" coords="83,11,165,39" href="aboutus.html" />
        <area shape="rect" coords="182,9,285,38" href="services.html" />
        <area shape="rect" coords="436,14,560,37" href="contact.html" />
        <area shape="rect" coords="563,14,682,38" href="accessories.html" />
      </map>
    </div>
    <p> </p>
    <form id="TheForm" name="TheForm" action="form2mail.php" method="post">
      <p align="center" class="style2">P<span class="style1">lease fill out form below for a &quot;free no obligation quote&quot; then click submit.</span></p>
      <p align="center" class="style3">(*Required Information)</p>
      <div align="center">
        <pre><strong><span class="style8">*Contact Name</span> </strong><input name="name" type="text" id="name" />
    <span class="style8"><strong>
    Business Name </strong></span><input name="bn" type="text" id="bn" />
    <span class="style8"><strong>*Phone Number <input type="text" name="first" size="3" onFocus="this.value='';"
        onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.second);" maxlength="3" value="###" /> - <input type="text" name="second" size="3" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.third);" maxlength="3" value="###" /> - <input type="text" name="third" size="4" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.fourth);" maxlength="4" value="####"/> </strong></span>
    <strong><span class="style1">*</span><span class="style8">Email Address</span> <input name="email" type="text" id="email" />     </strong> </pre>
        <label><span class="style9">*Re-enter to confirm</span>
        <input name="emx" type="text" id="emx" /></label><br /><br /><span class="style9">
    <label></label>
        </span>
        <p><span class="style9">*Best time to call </span>
          <select name="name1[]" multiple size="1" >
            <option>8am-9am</option>
            <option>9am-10am</option>
            <option>10am-11am</option>
            <option>11am-12pm</option>
            <option>12pm-1pm</option>
            <option>1pm-2pm</option>
            <option>2pm-3pm</option>
            <option>3pm-4pm</option>
            <option>4pm-5pm</option>
            <option>5pm-6pm</option>
            <option>6pm-7pm</option>
            <option>7pm-8pm</option>
          </select>
          <br />
          <br />
          <span class="style9">Type of Location</span>
          <select name="name2[]" multiple size="1" >
            <option>Residential</option>
            <option>Commercial</option>
          </select>
          <br />
          <br />
            <span class="style1"><br />
            <strong><br />
              <span class="style6">*Type of Services Requested:</span></strong><br />
            </span><strong><span class="style10">(check all that apply)</span><br />
                </strong><br />
                <span class="style7"><span class="style1"><strong>Janitorial cleaning</strong></span>
                <input type="checkbox" name="checkbox[]" value="checkbox" multiple/>
                <br />
                </span><strong><br />
                  <span class="style8">Mobile Auto Detailing</span>
                <input type="checkbox" name="checkbox2[]" value="checkbox" multiple/>
                <br />
                <br />
                  </strong><span class="style9">Moving/Hauling</span>
          <input type="checkbox" name="checkbox3[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Pressure washing</span>
          <input type="checkbox" name="checkbox4[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window washing</span>
          <input type="checkbox" name="checkbox5[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window Tinting</span>
          <input type="checkbox" name="checkbox6[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Boat cleaning</span>
          <input type="checkbox" name="checkbox7[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">RV cleaning</span>
          <input type="checkbox" name="checkbox8[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Motorcycle cleaning</span>
          <input type="checkbox" name="checkbox9[]" value="checkbox" multiple/>
          <br />
          <br />
          <br />
          <br />
          <input name="SB"  type="button" class="style9" value="Submit" onClick="sendOff();">
        </p>
      </div></label>
      <script language="JavaScript1.2">
    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this  header
    var good;
    function checkEmailAddress(field) {
    // Note: The next expression must be all on one line...
    //       allow no spaces, linefeeds, or carriage returns!
    var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org) |(\..{2,2}))$)\b/gi);
    if (goodEmail){
       good = true
    } else {
       alert('Please enter a valid e-mail address.')
       field.focus()
       field.select()
       good = false
    function autoTab(startPoint,endPoint){
    if (startPoint.getAttribute&&startPoint.value.length==startPoint.getAttribute("max length"))
    endPoint.focus();
    function checkNumber(phoneNumber){
    var x=phoneNumber;
    var phoneNumber=/(^\d+$)|(^\d+\.\d+$)/
    if (phoneNumber.test(x))
    testResult=true
    else{
    alert("Please enter a valid number.")
    phoneNumber.focus();
    phoneNumber.value="";
    testResult=false
    return (testResult)
    function sendOff(){
       namecheck = document.TheForm.name.value   
       if (namecheck.length <1) {
          alert('Please enter your name.')
          return
       good = false
       checkEmailAddress(document.TheForm.email)
       if ((document.TheForm.email.value ==
            document.TheForm.emx.value)&&(good)){
          // This is where you put your action
          // if name and email addresses are good.
          // We show an alert box, here; but you can
          // use a window.location= 'http://address'
          // to call a subsequent html page,
          // or a Perl script, etc.
          window.location= 'form2mail.php';
       if ((document.TheForm.email.value !=
              document.TheForm.emx.value)&&(good)){
              alert('Both e-mail address entries must match.')
    </script>
    </form>
    <p> </p>
    </body>
    </html>
    and here is the form2mail.php:
    <?php
    # You can use this script to submit your forms or to receive orders by email.
    $MailToAddress = "[email protected]"; // your email address
    $redirectURL = "http://www.chucksmobile.com/thankyou.html"; // the URL of the thank you page.
    $MailSubject = "[Customer Contact Info]"; // the subject of the email
    $sendHTML = FALSE; //set to "false" to receive Plain TEXT e-mail
    $serverCheck = FALSE; // if, for some reason you can't send e-mails, set this to "false"
    # copyright 2006 Web4Future.com =================== READ THIS ===================================================
    # If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
    # If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
    # To block an IP, simply add it to the blockip.txt text file.
    # CHMOD 777 the blockip.txt file (run "CHMOD 777 blockip.txt", without the double quotes)
    # This is needed because the script tries to block the IP that tried to hack it
    # If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
    # you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
    # you have to do the same with checkboxes
    Web4Future Easiest Form2Mail (GPL).
    Copyright (C) 1998-2006 Web4Future.com All Rights Reserved.
    http://www.Web4Future.com/
    This script was written by George L. & Calin S. from Web4Future.com
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
    $w4fver =  "2.2";
    $ip = ($_SERVER['HTTP_X_FORWARDED_FOR'] == "" ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_X_FORWARDED_FOR']);
    //function blockIP
    function blockip($ip) {
    $handle = @fopen("blockip.txt", 'a');
    @fwrite($handle, $ip."\n");
    @fclose($handle);
    $w4fx = stristr(file_get_contents('blockip.txt'),getenv('REMOTE_ADDR'));
    if ($serverCheck) {
    if (preg_match ("/".str_replace("www.", "", $_SERVER["SERVER_NAME"])."/i", $_SERVER["HTTP_REFERER"])) { $w4fy = TRUE; } else { $w4fy = FALSE; }
    } else { $w4fy = TRUE; }
    if (($w4fy === TRUE) && ($w4fx === FALSE)) {
    $w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body><font face=3Dverdana size=3D2>";
    if (count($_GET) >0) {
    reset($_GET);
    while(list($key, $val) = each($_GET)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end if
    else {
    reset($_POST);
    while(list($key, $val) = each($_POST)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }   
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end else
    $w4fMessage .= "<font size=3D1><br><br>\n Sender IP: ".$ip."</font></font></body></html>";
        $w4f_what = array("/To:/i", "/Cc:/i", "/Bcc:/i","/Content-Type:/i","/\n/");
    $name = preg_replace($w4f_what, "", $name);
    $email = preg_replace($w4f_what, "", $email);
    if (!$email) {$email = $MailToAddress;}
    $mailHeader = "From: $name <$email>\r\n";
    $mailHeader .= "Reply-To: $name <$email>\r\n";
    $mailHeader .= "Message-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\n";
    $mailHeader .= "MIME-Version: 1.0\r\n";
    if ($sendHTML) {
      $mailHeader .= "Content-Type: multipart/alternative;";  
      $mailHeader .= "  boundary=\"----=_NextPart_000_000E_01C5256B.0AEFE730\"\r\n";    
    $mailHeader .= "X-Priority: 3\r\n";
    $mailHeader .= "X-Mailer: PHP/" . phpversion()."\r\n";
    $mailHeader .= "X-MimeOLE: Produced By Web4Future Easiest Form2Mail $w4fver\r\n";
    if ($sendHTML) {
      $mailMessage = "This is a multi-part message in MIME format.\r\n\r\n";
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";
      $mailMessage .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";  
      $mailMessage .= "Content-Type: text/html;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= "$w4fMessage\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730--\r\n";  
    if ($sendHTML === FALSE) {
      $mailHeader .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader)) { echo "Error sending e-mail!";}
    else { header("Location: ".$redirectURL); }
    } else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";}
    ?>
    Thanks in advance,
    Glenn
    [Subject line edited by moderator to indicate nature of request]

    Using PHP to process an online form and send the input by email is very simple. The mail() function takes a minimum of three arguments, namely: the address the mail is being sent to, the subject line, and the body of the email as a single string. The reason some people use scripts like form2mail.php is because they don't have the knowledge or patience to validate the user input to make sure it's safe to send.
    Rather than attempt to trawl through your complex form looking for the problems, I would suggest starting with a couple of simple tests.
    First of all, create a PHP page called mailtest.php containing the following script:
    <?php
    $to = '[email protected]'; // use your own email address
    $subject = 'PHP mail test';
    $message = 'This is a test of the mail() function.';
    $sent = mail($to, $subject, $message);
    if ($sent) {
      echo 'Mail was sent';
    } else {
      echo 'Problem sending mail';
    ?>
    Save the script, upload it to your server, and load it into a browser. If you see "Mail is sent", you're in business. If not, it probably means that the hosting company insists on the fifth argument being supplied to mail(). This is your email address preceded by -f. Change the line of code that sends the mail to this:
    $sent = mail($to, $subject, $message, null, '[email protected]');
    Obviously, replace "[email protected]" with your own email address.
    If this results in the mail being sent successfully, you will need to adapt the code in form2mail.php to accept the fifth parameter. You need to change the following line, which is a few lines from the end of the script:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader))
    Change it to this:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader, '[email protected]'))
    Again, use your own email address instead of "[email protected]".
    Once you have determined whether you need the fifth argument, test form2mail.php with a very simple form like this:
    <form id="form1" name="form1" method="post" action="form2mail.php">
      <p>
        <label for="name">Name:</label>
        <input type="text" name="name" id="name" />
      </p>
      <p>
        <label for="email">Email:</label>
        <input type="text" name="email" id="email" />
      </p>
      <p>
        <label>
          <input type="checkbox" name="options[]" value="boat cleaning" id="options_0" />
          Boat cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="RV cleaning" id="options_1" />
          RV cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="motorcycle cleaning" id="options_2" />
          Motorcycle cleaning</label>
      </p>
      <p>
        <input type="submit" name="send" id="send" value="Submit" />
      </p>
    </form>
    If that works, you can start to make the form more complex and add back your JavaScript validation.

  • Send mails to 3 id's at a time

    Hi All:
    I have a probem with sending mails to 3 different persons at a time
    i have table called sudhir which has 3 email id's in it i am using these names to send mails
    this is the query what i am using
    DECLARE
    l_body CLOB;
    l_body_html CLOB;
    BEGIN
    l_body := 'To view the content of this message, please use an HTML enabled mail client.'||utl_tcp.crlf;
    l_body_html := '<html>
    <head>
    <style type="text/css">
    body{font-family: Arial, Helvetica, sans-serif;
                                   font-size:10pt;
                                   margin:30px;
                                   background-color:#ffffff;}
    span.sig{font-style:italic;
    font-weight:bold;
    color:#811919;}
    </style>
    </head>
    <body>'||utl_tcp.crlf;
    l_body_html := l_body_html || '<p> <Strong>Hi:</strong></p>'
    ||'<p>Thank you for your interest in the <strong>Dashboard Tool</strong> package.</p>'|| '<strong>Project Name:</strong>' || '    ' ||:P15_MAIL_PROJECT ||'  ' || '<br>Has crossed the org.limit PVA to be done </br>' || '<br>This is an automated mail. Please do not reply</br>'||utl_tcp.crlf;
    l_body_html := l_body_html ||' <br> Sincerely,</br>'||utl_tcp.crlf;
    l_body_html := l_body_html ||' <span class="sig">Sudhir</span>
    '||utl_tcp.crlf;
    for c1 in (select name from sudhir) loop
    if c1.name is not null then
    htmldb_mail.send(
    p_to => c1.name || 'xxx.com,
    p_from => '[email protected]',
    p_body => l_body,
    p_body_html => l_body_html,
    p_subj => 'Web Dashboard Tool E-Mail Test');
    end if;
    END;
    another question in the table i have 3 mail ids can i send 1 for to-address and another 2-cc as cc to them
    please suggest my earlier post had no replies
    thanks
    sudhir
    Message was edited by:
    Sudhir_N

    Check whether the mail server has been made blocked to send external mail id's

  • Mail receiver adapter: THeaderREPLY-TO not working on ASMA

    Hello people,
    (note: all the @ where changed by " at " because of limitations of SDN)
    I'm trying to set some adapter specific message attributes (ASMA) in a mail receiver adapter.
    Two properties I'm trying to set: THeaderFROM e THeaderREPLY-TO.
    The first one is working great, the second one does not work.
    My scenario is Soap to Mail. I send a soap message, in the message mapping a user defined function get the mail address (to and reply-to) and set it with DinamicConfiguration like this (hard coded to be simple):
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderREPLY-TO");
    conf.put(key, "reply.to at teste.com";);
    DynamicConfigurationKey from = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderFROM");
    conf.put(from, "from at teste.com";);
    As in the documentation, it should work. But the mail message reaches the mailbox with mime header Return-Path = from at teste.com.
    Reading all the notes related to mail adapter (and adapter module processing) I found the tool TCPGateway to monitor what is going from adapter engine to the mail server. So I changed a little the scenario to test it and now the scenario is Soap->TCPGateway->MailServer. In the TCPGateway I got this:
    EHLO brjgs916.weg.net
    MAIL FROM:<from at teste.com>;
    RCPT TO:<roberti at mycompany.net>;
    DATA
    Date: Thu, 5 May 2011 19:55:17 -0000
    Subject: mail - teste
    To: roberti at mycompany.net
    From: from at teste.com
    MIME-Version: 1.0
    content-id: payload-98c5c8b0775111e090110018714e4a28 at sap.com
    Content-Type: text/xml;charset=utf-8
    Content-Disposition: attachment;filename="Untitled.xml";
    Content-Transfer-Encoding: binary
    <?xml version="1.0"; encoding="UTF-8"?>
    <ns0:MTP_SAMPLE_MAIL_MESSAGE xmlns:ns0="http://soa.weg.net/sampleMail"><Title>titulo</Title><Body>body a ser preenchido</Body><Footer>footer tambem</Footer></ns0:MTP_SAMPLE_MAIL_MESSAGE>.
    QUIT
    With this information, I found that something is not right in the mail adapter, because it is not writing the relevant reply-to attributes to the mail message.
    Some of you has any idea about it?
    Thank you in advance.
    waldemar roberti
    Edited by: Waldemar Roberti on May 5, 2011 5:02 PM

    Satish,
    Actually (for testing purposes) I have the email roberti at mycompany.com set in all fields of receiver mail adapter mail attributes (from, to, cc and bcc). I turned all of them on and of and analysed the result. It seems that the information whe put on ASMA overloads the information on these mail attributes. But, in mail attributes, we don't have a field for REPLY-TO, just on ASMA we have this field.
    So... the problem is in REPLY-TO. It has not been set in mail adapter, even if I set it with dinamic configuration.
    thank you.
    Waldemar Roberti

  • Error in Notification Mailer Workflow

    Hi,
    I am having a strange situation in Oracle EBS Release 12.0.6 on Windows 2003 server. I think it may have started after applying the 12.0.6 patchset but I am not certain. The issue is with the workflow is not starting up anymore. Looking at log files in the %APPLLOG% directory I have this in the FNDCPG file :
    LOG_ID_UNKNOWN : oracle.apps.fnd.cp.gsc.Logger.Logger(String, int) : Logging to System.out until necessary parameters are retrieved for Logger to be properly started.
    LOG_ID_UNKNOWN : oracle.apps.fnd.cp.gsm.GSMSvcComponentContainer.initializeStateMachine() : BEGIN
    LOG_ID_UNKNOWN : oracle.apps.fnd.cp.gsc.SvcComponentContainer.getNewWorkflowContext() : BEGIN
    Could not start Service Component Container -> oracle.apps.fnd.cp.gsc.SvcComponentContainerException: Could not instantiate GSMSvcComponentContainerStateMachine -> oracle.apps.fnd.cp.gsc.StateMachineException: Could not instantiate GenCartComm with cpid=1287295 ->
    oracle.apps.fnd.cp.gsm.GenCartCommException: ORA-01403: no data found
    ORA-06512: at "APPS.FND_CP_GSM_IPC", line 499
    ORA-06512: at line 1
    oracle.apps.fnd.cp.gsc.SvcComponentContainerException:
    Could not instantiate GSMSvcComponentContainerStateMachine -> oracle.apps.fnd.cp.gsc.StateMachineException:
    Could not instantiate GenCartComm with cpid=1287295 -> oracle.apps.fnd.cp.gsm.GenCartCommException: ORA-01403: no data found
    ORA-06512: at "APPS.FND_CP_GSM_IPC", line 499
    ORA-06512: at line 1
         at oracle.apps.fnd.cp.gsm.GSMSvcComponentContainer.initializeStateMachine(GSMSvcComponentContainer.java:221)
         at oracle.apps.fnd.cp.gsc.SvcComponentContainer.start(SvcComponentContainer.java:781)
         at oracle.apps.fnd.cp.gsm.GSMSvcComponentContainer.main(GSMSvcComponentContainer.java:418)
    Here are the Java mailer tester for the inbound IMAP settings ( I have replaced the e.mail and password by xxxx here).
    D:\ora12\APP\inst\apps\APP_syedqadri\logs\appl\conc\log>%AFJVAPRG% -classpath %AF_CLASSPATH% -Dprotocol=imap -Ddbcfile=D:\ora12\APP\inst\app
    s\APP_syedqadri\appl\fnd\12.0.0\secure\APP.dbc -Dserver=in.izymail.com -Dconnect_timeout=120 -Ddebug=Y [email protected] -Dpass
    word=XXXXX -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer
    MLRTST : oracle.apps.fnd.cp.gsc.Logger.Logger(String, int) : Logging to System.out until necessary parameters are retrieved for Logger to be
    properly started.
    DEBUG: setDebug: JavaMail version 1.3.1
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.fetchsize: 16384
    * OK Welcome to IzyMail v3
    A0 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE SORT
    A0 OK CAPABILITY completed
    A1 LOGIN [email protected] XXXXX
    I have a similar output for the outbound as well....so I don't think I have any issues with the outbound and inbound server itself....but with these configurations my notification mailer is down and the above is the log...
    Could anyone shed light on why I would be getting ORA-01403: no data found in the FND_CP_GSM_IPC not sure what that does.....I have gone through the tests of the inbound and outbound java mailers on metalink and they are all working fine....any help would be appreciated.
    Thanks
    Syed
    Edited by: user501998 on Oct 6, 2009 9:41 PM

    This seems to be a bug - pl see MOS Doc 433046.1 (After Applying Patches 3438354 an 4017300, Workflow Services are not Starting) for a similar issue in 11i. You might have to open an SR and have Sipport troubleshoot.
    HTH
    Srini

  • Error in sending mail using ssl server

    Hi All
    Please help in resolving the below issue i am getting the following error while sending mail. I am using the IMAP server and it is ssl configured.
    DEBUG: setDebug: JavaMail version 1.4ea
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "mail.test.com", port 465, isSSL true
    DEBUG SMTP: exception reading response: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
    javax.mail.MessagingException: Exception reading response;
      nested exception is:
         javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
         at javax.mail.Service.connect(Service.java:275)
         at com.test.test.JavaMailApp2.main(JavaMailApp2.java:59)
    Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
         at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
         ... 4 more
    Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
         at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 17 more
    Caused by: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(Unknown Source)
         at sun.security.provider.certpath.PKIXCertPathValidator.doValidate(Unknown Source)
         at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown Source)
         at java.security.cert.CertPathValidator.validate(Unknown Source)
         ... 24 moreBelow is the source code of the program.
    package com.test.test;
    import java.security.Security;
    import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.NoSuchProviderException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class JavaMailApp {
         public static void main( String[] args )
              String d_email = "[email protected]";
              String d_uname = "ots.support";
              String d_password = "password";
              String d_host = "mail.test.com";
              String d_port  = "465"; //465,587
              String m_to = "[email protected]";
              String m_subject = "Testing";
              String m_text = "Hey, this is the testing email.";
              Properties props = new Properties();
              props.put("mail.smtp.user", d_email);
              props.put("mail.smtp.host", d_host);
              props.put("mail.smtp.port", d_port);
              props.put("mail.smtp.starttls.enable","true");
              props.put("mail.smtp.debug", "true");
              props.put("mail.smtp.auth", "true");
              props.put("mail.smtp.socketFactory.port", d_port);
              props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
              props.put("mail.smtp.socketFactory.fallback", "false");
              SMTPAuthenticator auth = new SMTPAuthenticator();
              Session session = Session.getInstance(props, auth);
              session.setDebug(true);
              MimeMessage msg = new MimeMessage(session);
              try {
                   msg.setText(m_text);
                   msg.setSubject(m_subject);
                   msg.setFrom(new InternetAddress(d_email));
                   msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                   Transport transport = session.getTransport("smtps");
                   transport.connect(d_host, 465, d_uname, d_password);
                   transport.sendMessage(msg, msg.getAllRecipients());
                   transport.close();
              } catch (MessagingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    public class SMTPAuthenticator extends Authenticator{
         public PasswordAuthentication getPasswordAuthentication()
            return new PasswordAuthentication("[email protected]", "password");
    }I have also added the certificate to my keystore using the following command and still i am facing this issue.
    keytool -import -trustcacerts -alias root -file mail_test_com.crt -keystore keystore.jks
    Add to fierof2's Reputation

    this is where i created the keystore.jks file
    I navigated to the location C:\Program Files\Java\jdk1.6.0_13\bin in command prompt and typed the following command to create the keystore
    keytool -import -trustcacerts -alias root -file mail_test_com.crt -keystore keystore.jksI was asked to set the password for keystore and then i was asked the question "Trust this certificate? [no]:" for which i gave yes.
    If this is not the right place to create the keystore.jks can you please tell me what is correct location to create the keystore file.

Maybe you are looking for

  • Itunes match turning library into download/stream only!! HELP

    OK I'm getting sick of this! I imported all my songs from my last library on another computer to my new computer. They were all in itunes and fine and I could play them all. Now I turn itunes match on....it does its thing and matches them all and the

  • What is the best strategy to save a file in client computer

    I want to save some information in a file in client computer. What is the best strategy to do? There are some ways I can think about. But none of them is good enough for me. 1. I gave all-permission. So, I can actually write what I want. But, in orde

  • Migrated using PST, problem with replying to old mails now

    Hi, we have migrated from Exchange 2007 to Exchange 2013. We built a new Exchange 2013 organization with new Active Directory... All new :) After exporting all mailboxes to PST's, we imported them using new-mailboximportrequest... Everything works fi

  • Same album name by different artists

    Hi Everyone, Im having an issue that I have 3 x 'Greatest Hits' albums by 3 different artists. The problem is that on my 160gig Classic the menu shows each of the albums individually when scrolling through the 'artist' menu. However when scrolling th

  • 11gRel2 DBCA - using compatible parameter 10.2.0.3.0 results in ORA-00201

    Hi guys, Following is the scenario: 1. Oracle DB Binaries: 11.2.0.2.2 2. Using dbca to create General Purpose Database and then modify initialization parameter "COMPATIBLE from 11.2.0.0.0 to 10.2.0.3.0" in the "All Initialization Parameters" window.