Restricting mails to a particular domain

Hello,
I am using JavaMail API and have a small requirement. I have to restrict my outgoing mails to only to a particular domain. I mean the mails that i send should go successfully only if the domain is "[email protected].Even if the users of my application types someother domain like yahoo.com or anything else, the mails shouldn't go. I want to restrict the users to send mails to only our company domain. Is that possible, any method available to set it so?
Please help.
Thanks in advance.
Pradeep

If you control the mail server you're using, you
can probably configure it to limit messages to
your domain.
There's nothing in JavaMail to help you with this.
If you can't configure your mail server, you'll have
to implement the limit in your application.

Similar Messages

  • Can Mail block all incoming mail from a particular domain?

    Can Mail be configured to block all incoming mail from a particular domain? I'd rather it be sent to the bit bucket than sent to a spam folder.

    Yes, go in to your rules and set it up for a folder of your choosing.  Click on the mail menu item then select preferences and then click on rules.

  • I am sending mails to a particular domain from MVC3 application, more details below Is there any server settings for the same?

    From MVC3 Application, There is mail functionality it works well but if in TO address if I am including a recipient mail of external domain mail is sent but taking long time. and If I am using same mail id with an another mail id it works immediately.
    Could you please advice the resolution?
    Bhanu Prakash K

    Hi Bhanu Prakash K,
    Did you mean that send email to an external domain email account slowly via MVC application? However, when
    send to an internal email account, will work
    immediately?
    Based on your description, this issue seems to be more related to MVC application. I suggest you should post
    this question in ASP.NET Model-View-Controller (MVC) Forum. I believe we will get a better assistance there.
    If any update or anything I misunderstand, please don't hesitate to let me know. 
    Best regards,
    Justin Gu

  • How can i block outgoing mails to  particular domain

    I have just set a mac mini with snow leopard server . Configured mail in it . I want to block the outgoing mails to some particular domain or all domains other than my server domain .
    please help

    Hi Fritz:
    Your English is FAR better than my Deutsch (Ich bin ein Wisconsonite).  I can barely ask for the train to Zermatt (one of my favorite places on Earth).
    Anyway, I think I understand your question.  If you mean is there a way to stop the recipient of an E-mail from actually getting it (after you sent it), the answer is no (in Apple's Mail application).  Entourage (a Microsoft application) is a good program.  As I recall (I used Outlook years ago in my corporate world) the Microsoft mail applications have a feature to "un-send" E-mail).  However, I think that only worked if the mail was sent to someone on the same network.  You could not retrieve mail from someone outside your own network.
    Barry

  • Outbound Mail Flow (bypass EOP for particular Domain)

    We have on-premises Exchange 2007/2013 Servers. And have hosted mail protection (Exchange Online Protection). Side note - 2007 servers being retired soon. Our mail is routed via EOP etc.
    One of our members of staff is starting to use a goverment secure mail service. This involves setting up a POP3 account on the users Outlook.
    It has to be configured to send over SMTP using SSL.
    Getting an error saying the connection encryption type is not supported when doing the send test (receives OK).
    Upon checking with the Support for the service, routing mail through Office365 will not work. We need to route the mail directly.
    This is probably a newbie question but how do I do that? Do I create a new send connector and define the particular domain in there? would I use my ISPs smart host address?
    It's just for sending mail, as I say the POP3 account is receiving OK using the POP3 settings.
    Thanks in advance.

    We have on-premises Exchange 2007/2013 Servers. And have hosted mail protection (Exchange Online Protection). Side note - 2007 servers being retired soon. Our mail is routed via EOP etc.
    One of our members of staff is starting to use a goverment secure mail service. This involves setting up a POP3 account on the users Outlook.
    It has to be configured to send over SMTP using SSL.
    Getting an error saying the connection encryption type is not supported when doing the send test (receives OK).
    Upon checking with the Support for the service, routing mail through Office365 will not work. We need to route the mail directly.
    This is probably a newbie question but how do I do that? Do I create a new send connector and define the particular domain in there? would I use my ISPs smart host address?
    It's just for sending mail, as I say the POP3 account is receiving OK using the POP3 settings.
    Thanks in advance.
    Yes, define a send connector for the recipients address SMTP scope. 
    You wouldnt need to smarthost necessarily, you could simply set it to use the MX record. 
    http://social.technet.microsoft.com/wiki/contents/articles/17842.configuring-domain-security-on-exchange-server-2013.aspx
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • TS3276 I have issues receiving e-mails from a particular sender. I can send e-mails to them but they can't send to me. They get "None of your e-mail accounts cold send to this recipient"

    Like stated above. I cannot receive e-mails from a particular e-mail address. I can send to them but they can't send to me.

    Have you contacted your email provider and asked if for some reason that sender or domain has been blacklisted?

  • Creation of transport rule to send all external mails through a particular server for a specific user..

    HI,
    In our Organisation We have a question, is there any possibility to create a transport rule for sending all external mails through a particular server by a specific user.
    in our organisation we have exchange 2007 one mailbox server and two hub transport servers...and we are using symantic gate way..

    Hi,
    Based on my knowledge, we can use the following transport rule to make that except with one user, other users cannot send outbound external emails:
    And I’m afraid that there is no Exchange feature to make one specific HUB server rout all external emails.
    Because if a Send connector is configured to send messages to an external domain, any Hub Transport server in the organization will route a message for that domain to a source server for that connector to be relayed to the destination domain.
    If you have any question, please feel free to let me know.
    Thanks,
    Angela Shi
    TechNet Community Support

  • Mail to a specific domain not being delivered

    We are able to send/receive emails to external domains and everything seems to be fine with our exchange server except when we try to send mails to this one domain @ ju.ahg.com.sa
    Upon troubleshooting further, we came to know this domain doesn't have a valid MX record.
    Yet the mails to this domain get delivered by gmail and other email services.
    If we use the SMTPDIAG tool, below is the output.
    Note that when its done from our domain, it gives error, when done from gmail ...its success!
    How can we fix this issue?
    SmtpDiag.exe "[email protected]" "[email protected]"
    Searching for Exchange external DNS settings.
    Computer name is xxx-exch2010-1.
    VSI 1 has the following external DNS servers:
    There are no external DNS servers configured.
    Checking SOA for ju.ahg.com.sa.
    Checking external DNS servers.
    Checking internal DNS servers.
    SOA serial number match: Passed.
    Checking local domain records.
    Checking MX records using TCP: xxx.com.sa.
    Checking MX records using UDP: xxx.com.sa.
    Both TCP and UDP queries succeeded. Local DNS test passed.
    Checking remote domain records.
    Checking MX records using TCP: ju.ahg.com.sa.
    Warning: The TCP DNS query returned no results.
    Checking MX records using UDP: ju.ahg.com.sa.
    Error: No MX or A records were found for the remote domain. Verify that the
    remote domain is valid. Your firewall allows outbound DNS queries (Windows
    NT/2000 Server requires TCP), and your DNS server can resolve external domains.
    =============================================================================
    SmtpDiag.exe "[email protected]" "[email protected]"
    Searching for Exchange external DNS settings.
    Computer name is xxx-exch2010-1.
    VSI 1 has the following external DNS servers:
    There are no external DNS servers configured.
    Checking SOA for ju.ahg.com.sa.
    Checking external DNS servers.
    Checking internal DNS servers.
    SOA serial number match: Passed.
    Checking local domain records.
    Checking MX records using TCP: gmail.com.
    Checking MX records using UDP: gmail.com.
    Both TCP and UDP queries succeeded. Local DNS test passed.
    Checking remote domain records.
    Checking MX records using TCP: ju.ahg.com.sa.
    Warning: The TCP DNS query returned no results.
    Checking MX records using UDP: ju.ahg.com.sa.
    Checking MX servers listed for [email protected].
    Connecting to mail.ju.ahg.com.sa [78.93.11.251] on port 25.
    Successfully connected to mail.ju.ahg.com.sa.

    You are right, when I looked up using MXTOOLBOX.com ; this domain seems to have a valid MX record, but no valid A record. Would that be the cause?
    Also, I tried through the command line, and it seems my DNS server is unable to resolve, so I am not even getting the MX record.
    I have 2 DNS servers , how can I try these commands to use the other DNS server ;
    as I tried on both servers, It gives the name of the first server only and says it can't find this domain: Non-existent domain.

  • How can send mails using hotmail/rediffmail domain name?

    I have used the below code to send a mail using javamail API?Even when I am sending my application does not have notified any of error/exceptions,But the message is not reached to I have given receipient's address in the to field.
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Sendmail1 extends HttpServlet {
    private String smtpHost;
    // Initialize the servlet with the hostname of the SMTP server
    // we'll be using the send the messages
    public void init(ServletConfig config)
    throws ServletException {
    super.init(config);
    smtpHost = config.getInitParameter("smtpHost");
    //smtpHost = "sbm5501";
    smtpHost = "www.rediffmail.com";
    public void doGet(HttpServletRequest request,HttpServletResponse response)
    throws ServletException, java.io.IOException {
    String from = request.getParameter("from");
    String to "[email protected]";
    String cc = "[email protected]";
    String bcc ="[email protected]";
    String smtp ="www.rediffmail.com";
    String subject = "hai";
    String text = "Hai how r u";
    PrintWriter writer = response.getWriter();
    if (subject == null)
    subject = "Null";
    if (text == null)
    text = "No message";
    String status;
    try {
    // Create the JavaMail session
    java.util.Properties properties = System.getProperties();
    if (smtp == null)
    smtp = "www.rediffmail.com";
    properties.put("mail.smtp.host", smtp);
    Session session = Session.getInstance(properties, null);
    //to connect
    //Transport transport =session.getTransport("smtp");
    //transport.connect(smtpHost,user,password);
    // Construct the message
    MimeMessage message = new MimeMessage(session);
    // Set the from address
    Address fromAddress = new InternetAddress(from);
    message.setFrom(fromAddress);
    // Parse and set the recipient addresses
    Address[] toAddresses = InternetAddress.parse(to);
    message.setRecipients(Message.RecipientType.TO,toAddresses);
    Address[] ccAddresses = InternetAddress.parse(cc);
    message.setRecipients(Message.RecipientType.CC,ccAddresses);
    Address[] bccAddresses = InternetAddress.parse(to);
    message.setRecipients(Message.RecipientType.BCC,bccAddresses);
    // Set the subject and text
    message.setSubject(subject);
    message.setText(text);
    Transport.send(message);
    //status = "<h1>Congratulations,</h1><h2>Your message was sent.</h2>";
    } catch (AddressException e)
    status = "There was an error parsing the addresses. " + e;
    } catch (SendFailedException e)
    status = "<h1>Sorry,</h1><h2>There was an error sending the message.</h2>" + e;
    } catch (MessagingException e)
    status = "There was an unexpected error. " + e;
    // Output a status message
    response.setContentType("text/html");
    writer.println("<title>sendForm</title><body bgcolor= ><b><h3><font color=green><CENTER>CALIBERINFO.COM</CENTER></h3>Your message was sent to recepient(s).<br><font color=red>"+"\n"+to);
    writer.println("<br><br><a href=e:/mail/javamail/mail.html>back to compose</a>");
    writer.close();
    Please any one help me out from this probs.
    Awaiting for yours reply,
    or give me a reply to: [email protected]
    Regards,
    @maheshkumar.k

    Hi,
    how can send mails using hotmail/rediffmail domain name?In your java application,you specified www.rediffmail.com as your
    smtp server.But that is the address of that website.Try will a smtp
    server instead.For a list of free smtp servers,please visit http://www.thebestfree.net/free/freesmtp.htm
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support/

  • How to restrict LOV to a particular project type through form personalize.

    Hi,
    I got a requirement to restrict LOV to a particular Project type through form personalization in project accounting module. form name: PAXPREPR
    i tried the below code in Builtin, but it didn't work
    SELECT distinct PROJ.SEGMENT1, PROJ.NAME,
    PROJ.DESCRIPTION, PROJ.PROJECT_ID
    FROM PA_PROJECTS_ALL PROJ,
    PA_PROJECT_TYPES_ALL TYPES,
    pa_proj_elements ppe,
    pa_proj_structure_types ppst,
    pa_structure_types pst
    WHERE PROJ.TEMPLATE_FLAG <> 'Y'
    AND PROJ.PROJECT_TYPE = TYPES.PROJECT_TYPE
    AND TYPES.CC_PRVDR_FLAG <> 'Y'
    AND proj.project_id = ppe.project_id
    and ppe.object_type = 'PA_STRUCTURES'
    and ppe.proj_element_id = ppst.proj_element_id
    and ppst.structure_type_id = pst.structure_type_id
    and pst.structure_type = 'FINANCIAL'
    and proj.project_type = 'GRANT'
    order by PROJ.SEGMENT1
    please suggest me where i went wrong.
    Edited by: 925049 on Apr 3, 2012 2:49 PM

    In the Control Data of FS00 there is field 'Authorization Group'
    Please Create an Authorization Group for those user ID who can post TDS entries.
    then Maintain this group for TDS related GL.
    Then others will not able to post to this GL.
    Regards,
    Alok

  • How to Restrict printing the document using IRM for a Single Document?Allow printing for some documents and restrict the printing for particular documents in same document library?

    Can we able to Configure the IRM in Document Level in SharePoint Document libraries?
    The document library contains multiple document sets , Can we restrict the printing according to document sets? Allow printing for some documents and restrict the printing for particular documents in same document library
     Is this possible?Please suggest.

    Yes, that can be done. But note that all administrators will have the same right to print, so you need to make sure the users are not administrators. You can include a macro to disable printing, but if the users disable macro, they can print the documents.
    Hence, there is no foolproof way to prevent printing documents. If you still need a foolproof security, PDF format provides password based security (viewing doesn't require a password) that can be implemented to prevent the document from printing,
    which doesn't require any special scripts and is tough.
    You can have a look at the following links:
    http://msdn.microsoft.com/en-us/library/office/ms458245(v=office.14).aspx
    http://msgroups.net/microsoft.public.word.docmanagement/prevent-printing-of-docum/91353
    http://www.go4sharepoint.com/Forum/prevent-printing-saving-documents-10150.aspx
    The following link explains about the security features in PDF. This is for information purpose only and not for promotion of any products:
    http://www.pdflib.com/knowledge-base/pdf-security/
    Balaji Kundalam

  • How to send a mail on a particular date

    hello everybody.
    i am developing a greeting site.
    where in i need to send a mail on a particular date, which is greater than today. how can i send mail on a pre selected date.
    my server is IIS and i am using java servlets and java mail api.
    please tell me if anybody having the solution.
    or please mail me to [email protected]
    thank you
    sambareddy
    hyderabad

    As far as I know there is no method in JavaMail for sending a message on a particular date.
    However you can use the Java.util.Timer and java.util.TimerTask class to do this.
    In the class that you send your message from
    public class SendMessage extends TimerTask{
    public void run(){
    //send message here
    TimerTask implements Runnable so a thread can be created here.
    To call the thread:
    public class CallMessage{
    public static void mail(String args[]){
    SendMessage sm = new SendMessage();
    Timer timer = new Timer();
    timer.schedule(sm, 10000, 10000)
    //wait for 10 seconds and repeat in 10 seconds
    There are a number of different schedule methods available for whatever you need to do.
    Hope this helps!

  • Sending mail to a particular partner function in workflkow

    hi all
    i m working on a workflow in which i have defined user as general,means anyone can start the workflow,now i want to assign agent to workflow ,how can i assign the agent and also how to send the mail to a particular partner function in our  case we have described "loan officer",
    please guide regarding the query
    regards
    ashish

    hi
    i should  tell first of all m working on CRM 5.0 standalone system.we are trying to trigger mail for LEAD .when say we are trying to change the status of lead or whenever the status of lead is changed the mail should be triggered to loan officer.
    hope i clear the air,now pz advise
    regards
    ashish

  • Picking mails from a particular sender using mail sender adapter

    Hi Everyone,
    I want to create a scenario in which i want to pick mails from a particular sender and send it to XI.
    I don't want all the unread mails to be sent to XI but only those belonging from a particular sender.
    How should i configure the mail sender adapter to achieve the same.
    Thanks and Regards
    Rahul Nawale

    Hi,
    there are two ways to do that:
    not standard:
    create a java proxy which will check your maibox for mails
    from only one particular sender and then send messages
    to the xi
    more standard:
    create a new accound and redirect your mails from a particular sender from the main mailbox to this new one
    and poll from this new one only...
    this way you'll be able to use atandard mail adapter
    with no changes at all
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Problem going to one particular domain

    I have a problem going to one particular domain, sanjoseca.gov. Any websites starting with http://www.sanjoseca.gov/ do not load. I've tried enptying the cache, but that doesn't work. I have no problem loading any other domain. I used to be able to access the city's sites without problem up to a couple of seeks ago, but since then, I can't load. I tried using Firefox, but can't with it, either. The city says they have no problems with their site and a city employee went onto the internet while I was talking with her and had no problem. Any suggestions?

    jwsapp-
    That site loads fine for me.
    I would quit Safari and delete all cookies having to do with that site --
    or dump them all. Safari Prefs>Security>Cookies>Show All Cookies.
    Also, make sure you've cleared your Safari Cache & History.
    It also might be helpful to trash your icons folder:
    Your HOME (YourName) folder>Library>Safari>Icons.
    Restart Safari.
    Do those & report back, OK.

Maybe you are looking for

  • Documents folder

    Accidentally deleted my documents file, loosing all docs created in past year.  Need these docs.  Unfortunately have not been able to create backups due to problems with computer not recognizing my RW DVD's are in the drive... Is there a way to retri

  • How to edit a video that has already been exported?

    I have a video which was exported, however I would like to go back and edit some things. When I open FCPX, I am unable to find the video file at all, and the only way I can even see it in the program is by importing the already exported file. Obvious

  • When I open an image in Photoshop, I cannot see the file.  The thumbnail in on the right, but I cannot see the image on the work area. I am using Windows 8

    When I open Photoshop CS6 I cannot view the image.  The thumbnail is visible on the right hand side and the work area shows the file information, but no image.  I have updated PS, my driver. It is the same for both jpg or RAW.

  • Cant charge phone ! help

    help, whilst trying to upload latest software my phone lost its charge, all i get now on the screen is 'the connector symbol on screen ie trying to connect to i tunes with white arrow ', tried different usb ports , switched of computer several times

  • Dump in ALV using oo

    An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not   caught and therefore caused a runtime error. The reason for the exception is: Es wurde versucht mit einer 'NULL' Obje