Having troubles sending mails

I have a code which sends mails getting the addresses from a file. So long I havae just been able to send mails to addresses which end with @mail.mty.itesm.mx , if i put any other address, a nested exceptions is thrown which for every address of any other type. I will aprecciate a lot some help.
Here is the code:
class MailBomber extends Thread{
     protected String host,de,texto,filePath;
     protected Session sesion;
     protected InternetAddress[] respuesta;
     protected Properties prp;
     public MailBomber() throws AddressException{
          host="mail.mty.itesm.mx";
          de="[email protected]";
          filePath=null;
          respuesta= new InternetAddress[1];
          respuesta[0]=new InternetAddress("[email protected]");
          prp=System.getProperties();
          prp.put("mail.smtp.host",host);
          sesion=Session.getDefaultInstance(prp,null);
          texto="<html><body><font size=7 color='blue'><center>     Acabe con todos sus problemas computacionales!     </center></font><font color='red' size=4>En Dolph S.A. nosotros le ofrecemos la atenci�n de personal capacitado en mantenimiento y reparaci�n de computadoras listo para solucionar cualquier problema que Ud pueda tener. Satisfacci�n grantizada. <br>Servicio a domicilio en Monterrey y su area metropolitana.     </font><br><br><font size=4 color=0'blue'>Pregunte por nuestras ofertas. <br>Ofrecemos descuento mencionando este anuncio.*</font><br><br><br>Cont�ctenos al 81-00-94-20<br><br><br><font size=1>* Promoci�n no acumulable. V�lido s�lo en servicios participantes.</body></html>";               
     public MailBomber(String filePath) throws AddressException{
          this();
          this.filePath=filePath;
     public void run(){
          try{
               if(filePath==null){
                    mandaElMail("[email protected]");
                    sleep(50);
               }else{
                    BufferedReader reader= new BufferedReader(new FileReader(filePath));
                    String line;
                    int counter=0;
                    while((line=reader.readLine())!=null){
                         System.out.println("vamos en el numero "+(++counter)+" enviado a "+line);
                         mandaElMail(line);
                         sleep(80);
               System.out.println("Ya acab�");          
          }catch(Exception ex){
               System.out.println(ex.toString());
     public void mandaElMail(String para){
     try{
          MimeMessage mensaje=new MimeMessage(sesion);
               mensaje.setContent(texto,"text/html");
               mensaje.setSubject("Reparaci�n de Computadoras en Monterrey");
               mensaje.setFrom(new InternetAddress("[email protected]","Dolph Computaci�n"));
               mensaje.setReplyTo(respuesta);
               mensaje.addRecipients(MimeMessage.RecipientType.TO,para);
               Transport.send(mensaje);
          }catch(Throwable ex){
     System.out.println(ex.toString()+" en mandarElMails");
thanks a lot for any help

That message said the server could not relay, right? That is one of the JavaMail FAQs. Ask the administrator of your mail server (mail.mty.itesm.mx) about it.

Similar Messages

  • Is anyone else having trouble sending mail?  I have a MobileMe subscription - not sure whether that is the problem.  The Port assigned to my mail account on my iMac has a different number for the one recommended by Apple, but I hesitate to change it.

    Is anyone else having trouble sending mail on an iMac running 10.6.8.  I get a messsage that the server can't be accessed.  Apple help suggests using a different port from the one that was originally set.  I have a Mobile Me account.  Any suggestions?

    I had major issues with the iPhone 4s battery, however it’s resolved.
    The tech who set the phone up at the Apple store did so with little training.
    if you have a mobile me account. First go and move all your data to the cloud by going on your computer and logging in at me.com/move. The cloud has replaced mobile me, so there is no need for those two accounts
    Also make sure that for any of your email accounts you set them up to fetch, not push. My tech person set them all to have the email servers push data to the phone. The new iphone4s antenna is extremely strong so it will continually try to access stuff that is pushed–***** a lot of battery life doing this. It makes it worse if you have exchange 2010 accounts. Something about changes made to exchange really suck battery life from devices that access such accounts.
    turning of locator and the push notifications from facebook--they have a lot!

  • Having trouble sending mail from iPad. It keeps freezing? Can anyone help?

    I am having trouble sending mail as it keeps freezing mid send. Sometimes it takes a couple of days to suddenly send. Rest of iPad working fine. Can anyone help?

    You are welcome!
    I enclose the link to show how 'this solved my question' and 'this helped me' work since there is no point in awarding either of them to yourself. As so can see, you do not get any points. It is oly a short read
    https://discussions.apple.com/static/apple/tutorial/mark.html

  • Still having trouble sending mail after Yosemite software update!!

    It worked for a few days after I installed the update, but it's now having the same issue all over again with outgoing mail.  Infuriating!

    Hello champsanmarcos,
    After reviewing your post, I have located an article that can help with outgoing in message in Mail for Yosemite. It contains a number of troubleshooting steps and helpful advice for the issue you are experiencing:
    Mail (Yosemite): If you can’t send messages
    If the Send button  is dimmed in the toolbar of your message, or your message can’t be sent using the outgoing mail server, try these suggestions. 
    Make sure the outgoing (SMTP) mail server is specified as directed by the provider of your email account. For more information, see Verify an account’s outgoing mail server. 
    If a dialog states that you need permission to send a message, your account uses parental controls. For more information, see Request permission to send messages. 
    Choose Window > Connection Doctor, then follow instructions displayed in the Details column.
    If there’s a firewall problem, verify that firewall software isn’t blocking email traffic on port 25, 465, or 587. Also check whether you’re affected by another firewall, such as software installed separately from OS X or built into an Internet sharing router, or administered by your account provider. Contact the appropriate person for information. 
    You may be able to send messages from only a certain location, or your account provider may allow you to send messages but with stricter settings (such as requiring a name and password). Contact your provider, then change the outgoing mail server settings in Mail preferences as needed.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • Having trouble sending mail with aol  account

    i cant send out mail please help

    I tried this just now, but it will not let me re-add it now.

  • Anyone having trouble sending mail through Cox today?

    I have had my iPhone since it's release, and have been sending e-mails with no problem. Today for some reason I am getting a message that the server is not responding/failing. Just wondered if I was the only one....

    I am not the technical one if the family, but on another thread w/ the same issue, someone called ATT and they said the cmwx server is down.

  • I am having trouble sending mail to earthlink accounts.

    Anyone having this problem?  It doesn't seem to happen on my iphone.. When I am in mail program, I can email all accounts but can't email earthlink from my icloud...? I can email earthlink from my other providers. Please help!!!

    assuming you mean "iMessages"
    if so, your not alone - https://discussions.apple.com/thread/5401156?tstart=0

  • Troubling sending mail. Wants me to pick another mail server?

    I'm having trouble sending mail through my MobileMe.
    I set up all the outgoing settings according to this:
    http://support.apple.com/kb/TS1152
    But my email still doesn't want to go out. I've run connection doctor and everything gets a green light. Any suggestions?

    I had a problem today, for some reason me.com had the mail message being sent from a different account than the one I used to create it in. I just deleted the message and did it again and it went the second time..maybe this helps maybe it dosn't.

  • Yet More Trouble Sending Mail

    I'm having trouble sending mail via my POP account on ATT. It worked fine until a few days ago and then quit working. I didn't change any settings or download any updates, so that's not the cause. I've gone into preferences and checked all the server settings, and they seem fine except that in the accounts pane, the outgoing server has my user id mysteriously added on following a colon (ie servername: userid). In the server settings popup, the server name is correct, without the added colon. I tried deleting the server and re-adding it, but it still doesn't work. I know I should be able to get to the server, since we use the same settings on my husband's computer, which uses the same network connection as my Mac. Any thoughts?
    Thanks,
    Nancy
    Powerbook G4   Mac OS X (10.4.2)   Mail 2.0.3

    It's now working again, after I deleted a note that was in the outbox. Perhaps something in that note was hanging things up, although I'm not sure what could be.

  • I am having trouble sending bulk emails (less than 100 at a time) on my gmail account using group names created from my address book.  I use Mail on my I-Mac.  When I try to send out a bulk email, the message shows up that my server can't send them, etc.

    I am having trouble sending bulk emails from a Mail Group (less than 100 at a time) on my gmail account.  They come back saying the server can't recognize the data and try again with selected server or try later or edit message, all of which I have attempted a number of times, including re-booting the computer.  I am wondering if there is something wrong in my Address Book?  I have check Apple Preferences, and Mail Preferences and all seems in order.  I can send to any of the individual addresses, but not in a group.
    Thanks for your help.

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • I have a MacBook Air, OS 10.8.5 I am having trouble sending attachments with Mail. Even small (130K) files don't go. It tries to send then gives up. What can I do to fix this?

    I am having trouble send messages with attachments in Mail. Even small attachments (130K) Mail tries to send, then gives up and the message sits in my out box. How can I fix this?

    1. You need an external DVD drive.
    2. There are no Mac OS X applications or other software in the iTunes App Store.
    (116312)

  • TS3276 Having trouble sending jpeg images as attachments in Mac email.....they go thru as images and PC users can't see the SAVE or QUICK LOOK boxes that Mac mail has.  One friend scrolled over the image, right clicked on it and saved as a PNG file.

    Having trouble sending jpeg images as attachments in Mac email.....they go thru as images and PC users can't see the SAVE or QUICK LOOK boxes that Mac mail has.  One friend scrolled over the image, right clicked on it and saved as a PNG file.

    Apple Mail isn't going to change the format of any of your attachments. it isn't going to corrupt them either.
    Exchange is a transport protocol and server. The issue you describe is not related to Exchange.
    There are many different versions of Microsoft Outlook in use and they all have e-mail bugs. Different versions have different bugs. Some Apple Mail hack to get around a bug in Outlook 2003 may cause the same message to be problematic in Outlook 2000. Fix them both and another issue will cause trouble in Outlook 2007. You can't fix this. Apple can't fix this. Microsoft can and has but that is irrelevant if your recipients are using older versions.
    One specific problem is that Apple Mail always sends image attachments inline, as images, not as iconized files. You can change this with Attachment Tamer. Just be aware that use of this software will break other things such as Stationery. E-mail is just a disaster. To date, no one outside of Apple has ever implemented the e-mail standards from 1993. Apple has continually changed its e-mail software to be more compatible with the de-facto standards that Netscape and Microsoft have unilaterally defined and people documented as "standards" after the fact. The e-mail messages that Apple Mail sends are 100% correct and do not violate any of the original standards from 1993 or the Microsoft/Netscape modifications. The problem is entirely bugs and limitations in various versions of Outlook.

  • Mac Mail Issue: I was having trouble sending to hotmail accounts from my Earthlink account, they had me go into Mac Mail preferences and make changes, now Mac Mail doesn't work AT ALL - any help changing the settings back to correct Mac Mail settings? I c

    I was having trouble sending to hotmail accounts from my Earthlink account, they had me go into Mac Mail preferences and make changes (because they claimed it was Mac Mail's fault, even though the hotmail error code said it's because Earthlink is blocked by hotmail), now Mac Mail doesn't work AT ALL - any help changing the settings back to correct Mac Mail settings? I can provide a transcript of the entire tech chat session, if that will help...

    both apostrophes are used correctly, thanks
    doesn't = does not (this is called a contraction)
    it's = it is
    Mac Mail's fault = possessive
    any help with the actual issue? thanks!

  • I am having trouble sending an email from mail on my macbook pro. It keeps requesting my password. What should I do?

    I am having trouble sending an email from mail on my macbook pro. It keeps requesting my password. What should I do?

    There seems to be a few bugs with iCloud Mail at times, so send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback
    Apple support article, but I don't think it really addresses your problem.
    iCloud - Mail Troubleshooting

  • TS3899 I am having trouble sending e-mails, I receive OK but it will not send

    I am having trouble sending e-mails, I receive OK but it will not send

    check with you provider if the settings of your outgoing server are correct
    stttings mail account outgoing server

Maybe you are looking for

  • Mail address book and my Address Book.app are different

    I tried to delete Plaxo. Now when I access my address book from Mail, I don't have the 3rd column containing phone numbers, addresses, etc. However my AddressBook.app has all that information, but it doesn't work with Mail. I click on an address with

  • All of my music has disappeared from my library! Help please!

    So I get onto my family's home computer to update my iPod when my whole library is empty. I've looked all over the web for help but for some reason my iPod won't appear in the My Computer folder. I had music that I had purchaced from the iTunes store

  • Wi-Fi connection strange happenings

    Hi When I connect to Macworld through Wi-Fi the pages open but when I touch on an eddying the iPad returns the following "Unable to reach Macworld Service! The iPad could not reach the Macworld Service. To download the latest magazine content please

  • IMac G5 20" monitor looks flakey

    I have an iMac 20" G5 (not isight) and the monitor has suddenly gotten lines the entire length of it. Is anyone familiar with the cause? Link to a screenshot is below. http://www.2047.org/g5.gif

  • How can I start Windows XP Mode when there is no startup link in the Start Menu?

    I have installed and had to uninstall and reinstall Windows XP Mode numerous times on my Dell desktop running Windows 7 Professional and now I cannot start it because there is no startup link in the Program Files folder. When i try to reinstal XP Mod