Invalid sender address

Hi,
I have to send an email, but the sender address may be invalid, in which case I should suppy a "default" valid address. Is it possible to check that address before calling Transport.send(Message m, Address[] a)? Is there any isAddressValid() method?
Thanks,
Mgalois

No, an application cannot, but a library can. I finally found a solution: first I perform a "local" check of the email address (if @ char isn't present, if a dot isn't present after the index of @ etc.) then I send the message and check the exception message. If the message contains the string "Domain of sender address <the_address> does not exist" then the address isn't valid.

Similar Messages

  • Roadrunner/cwmx and Invalid sender address problems

    I have spent hours trying to fix problem with Road Runner email when not connected to rr via wifi.
    Background: rr doesn't allow smtp outgoing if you aren't connected to their cable. Thus you have to be on wifi from your cable router. So, many folks turn on ATT cwmx.com smtp server to send mail when on 3G or Edge. iPhone email is supposed to try next smtp server if first one fails. But when sending mail many folks are getting "Invalid sender address" error message.
    I had thought the error message was coming from cwmx but now think that it is coming from road runner's smtp server and the iPhone is not going on to the next smtp server, i.e. cwmx.com.
    Maybe this is the problem/bug. I know there are some other bugs in iPhone mail app. For example I have 4 smtp servers showing in "Other SMTP servers" all with the same address and there is no way to delete the duplicates.

    It is usually the ISP being used for the internet connection with the SMTP server restriction.
    Most, if not all ISPs block the use of SMTP servers that are outside of their network (or that isn't provided by the ISP) unless the SMTP server is authenticated.
    Most ISPs don't provide/support an authenticated SMTP server, and Time Warner is one of them. If TW provided/supported an authenticated SMTP server for RoadRunner accounts, using RR's SMTP server wouldn't be an issue regardless the internet connection.
    I access my MobileMe account and a business POP account with the iPhone's Mail client. Both accounts have an authenticated SMTP server and I've never had a problem sending with either account regardless my internet connection - via numerous wi-fi connections with different ISPs or via EDGE with my first generation iPhone, or via 3G or EDGE with my iPhone 3G.
    These restrictions are in place as a part of an overall effort to prevent spam emanating from the ISP's domain.

  • Unsent message with Invalid Sender Address: NOT in OUTBOX!

    I have an unsent email that is stuck "somewhere", the result of accidentally entering the incorrect email address when modifying a mobileMe account. When it tries to send, I used to get "Sender Address Invalid". But there are no messages left in the Outbox to delete.
    So now at the bottom center of the MAIL screen it says "1 Unsent Message". And every so often it'll try sending it ("Sending 1 of 1). But then it'll just stop -- with no messages.
    Restarting the iPhone doesn't clear it out.
    Where is this message sitting? And how does one zap it?

    One thing that might help out.
    Go to settings > mail, contacts, calendars > your mail account.
    Then tap on smtp to view all your servers.
    Make sure your primary server is on.
    Then go through and turn on all your secondary servers.
    Go back into mail and see if you have an outbox with an unsent message.
    Hope this helps.

  • Invalid recipient address - while sending mails

    Hi Experts,
    I am trying to send a PDF form as a mail attachment from my SAP R/3 server (version ECC 6.0)
    Using the following code:
    PARAMETER : p_addr TYPE adr6-smtp_addr DEFAULT  'ashish.shah xyz.com'.
    *"Look up the generated function for the Book Flight Form
    DATA : l_name TYPE funcname.
    TRY.
        CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
          EXPORTING
            i_name     = 'Z_CUST_BOOK_FLIGHT_FORM'
          IMPORTING
            e_funcname = l_name
          EXCEPTIONS
            OTHERS     = 0.
      CATCH cx_fp_api_repository.                           "#EC NO_HANDLER
      CATCH cx_fp_api_usage.                                "#EC NO_HANDLER
      CATCH cx_fp_api_internal.                             "#EC NO_HANDLER
    ENDTRY.
    DATA : l_outputparams TYPE sfpoutputparams.
    *"Start form processing
    l_outputparams-getpdf = 'X'.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams = l_outputparams
      EXCEPTIONS
        cancel          = 1
        usage_error     = 2
        system_error    = 3
        internal_error  = 4
        OTHERS          = 5.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *" Call the generated function for the Book Flight Form
    DATA : fp_docparams TYPE sfpdocparams,
           reservedonly TYPE bapisbodat-reserved,
           booking_data TYPE bapisbonew,
           fp_result    TYPE fpformoutput.
    fp_docparams-fillable = 'X'.
    fp_docparams-langu = sy-langu.
    CALL FUNCTION l_name
      EXPORTING
        /1bcdwb/docparams  = fp_docparams
        reserved           = reservedonly
        booking_data       = booking_data
      IMPORTING
        /1bcdwb/formoutput = fp_result
      EXCEPTIONS
        usage_error        = 1
        system_error       = 2
        internal_error     = 3
        OTHERS             = 4.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    DATA : pdf TYPE fpformoutput-pdf.
    pdf = fp_result-pdf.
    *"End the form Processing session
    CALL FUNCTION 'FP_JOB_CLOSE'
      EXCEPTIONS
        usage_error    = 1
        system_error   = 2
        internal_error = 3
        OTHERS         = 4.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *"Create and send the email
    DATA : bcs_exception TYPE REF TO cx_bcs.
    TRY.
    *"Add text to the email body
        DATA : l_subject      TYPE so_obj_des,
               l_mailtext     TYPE bcsy_text,
               l_mailtext_row TYPE soli.
        l_subject = 'Trip Creation Form'.
        CONCATENATE 'Please fill out the form and return it to:'
                    'ashish.shah xyz.com'
                    INTO l_mailtext_row.
        APPEND l_mailtext_row TO l_mailtext.
    *"Create the email document
        DATA : document   TYPE REF TO cl_document_bcs,
               num_rows   TYPE i,
               textlength TYPE so_obj_len.
        DESCRIBE TABLE l_mailtext LINES num_rows.
        num_rows = num_rows * 255.
        MOVE num_rows TO textlength.
        document = cl_document_bcs=>create_document(
                     i_type    = 'RAW'
                     i_text    = l_mailtext
                     i_length  = textlength
                     i_subject = l_subject ).
    *"Add ataachment
        DATA : attdoctype TYPE soodk-objtp,
               atttitle   TYPE sood-objdes,
               attsize    TYPE sood-objlen,
               pdftab     TYPE solix_tab.
        attdoctype = 'pdf'.
        atttitle = 'CreateFlight'.
        attsize = XSTRLEN( pdf ).
        pdftab = cl_document_bcs=>xstring_to_solix(
                    ip_xstring = pdf ).
        document->add_attachment( EXPORTING i_attachment_type = attdoctype
                                            i_attachment_subject = atttitle
                                            i_attachment_size = attsize
                                            i_attachment_language = sy-langu
                                            i_att_content_hex = pdftab ).
    *"Create persistent send request
        DATA : send_request TYPE REF TO cl_bcs.
        send_request = cl_bcs=>create_persistent( ).
    *"Add document to send request
        send_request->set_document( document ).
    *"Get sender object
        DATA : sender TYPE REF TO cl_sapuser_bcs.
        sender = cl_sapuser_bcs=>create( 'A146861' ) .
    *"Add sender
        CALL METHOD send_request->set_sender
          EXPORTING
            i_sender = sender.
    *"Create recipient
        DATA : recipient TYPE REF TO if_recipient_bcs.
        recipient = cl_cam_address_bcs=>create_internet_address(
                                                  p_addr ).
    *"Add recipient with its respective attributes to send request
        send_request->add_recipient( EXPORTING i_recipient = recipient ).
    *"Set send immediately
        send_request->set_send_immediately( 'X' ).
    *"Send document
        send_request->send( ).
        COMMIT WORK.
        WRITE: 'Email coantaining the Interactive form was sent'.
      CATCH cx_bcs INTO bcs_exception.
        DATA : ex_msg TYPE string.
        ex_msg = bcs_exception->get_text( ).
        WRITE: 'Caught exception.', ex_msg.
    ENDTRY.
    I get a Mail sending failure notification in my SAP Businesss work place, with the title "Cannot be sent: Trip Creation Form " With status as :
    Status for Recipient ashish.shah xyz.com:
         No delivery to ashish.shah xyz.com, invalid recipient address
    I have entered the correct Email IDs, but still getting this error.
    Can you guys help?
    Regards,
    Ashish Shah

    Hi Ravi,
    I have @ in all the email IDs in my code , but i have removed it from this post.
    It seems SDN has implemented some new check - where in it checks for Email IDs in the post and gives error when any email ID is encountered.
    Can you now spot anything else , which could be the cause for the status as Invalid receipient?
    Regards,
    Ashish Shah

  • Sending mail to invalid mail address but domain valid.im not getting any NDR

    Hi,
    In my organisation I'm sending mail to invalid email address but domain is valid ...i'm not getting any NDR. I want NDR like this
     The e-mail address you entered couldn't be found. Please check the recipient's e-mail address and try to resend the message. If the problem continues, please contact your helpdesk

    Hi,
    Please check whether other users can receive NDR message when sending mails to invalid email address. If the issue happens to all users and all related configurations are proper, please check whether there are any transport rules directly
    deleted the mails that send to an invalid address.
    Thanks,
    Winnie Liang
    TechNet Community Support

  • Mail problem - "Sender address was invalid"

    So I get this message from time to time: then I try to send an e-mail from the mail app on my iPod Touch, it'll come back to me saying "The Sender Address was invalid" and won't send it. However, it's gotten worse of late; previously, I would hit the refresh button and then it would send, but recently that has stopped working. For about 45 minutes this morning I tried to send an e-mail and it just wouldn't send. I ended up having to log into my e-mail manually (through Safari on my iPod) to get it to send (which worked). However, I would like to know if anyone else has encountered this problem, if anyone knows what causes it, if anyone knows how to solve it, and if it would be worthwhile submitting a bug report to Apple about this. Thanks.

    With so many threads and indy websites posting this problem, I'm not sure where's best to post my solution. So it's here and I hope someone gets help from it.
    Same thing - "sender address blah blah blah" and none of the fixes worked. So I deleted the outgoing server (or so I thought!) and restarted the iPod. The server was not listed.
    Then I reentered the information and used Port 25 (I had tried that before but went back to the default port of 587 before deleting the old server).
    I connected to my WiFi and my mail went thru immediately. But what was interesting was the 'old' server showed up as the backup with port 587. I don't dare touch a thing - it's working!
    BTW, I am using my own website and mail servers (hosted elsewhere).
    Interestingly, if the iPod is accessing the mail servers, the computer access is blocked. Probably my host no allowing multiple connections from the same location, but I've done that before with my laptop and other Macs here w/o a hitch. But really a big deal, but interesting.
    Thanks to all who have posted in this thread and all the other threads. Together, we ARE tech support! But the Apple guys and gals are great as well. And this iPod Touch is AMAZING!

  • E-mail error:  Cannot Send Mail:  The sender address was invalid

    I can receive e-mail but cannot send it. Everything goes to my outbox. I did not change any settings. Nothing has changed that I know of. For months I could send e-mail -- now I cannot. I even e-mailed myself, and it says the sender address is invalid. Can anyone help? Thanks!

    The "Recipient addresses are invalid" message is misleading.
    Most ISP's don't allow you to send email through their SMTP server unless you are A) on their network (e.g. connected via wi-fi to a cable connection provided by your ISP) or B) you authenticate to their SMTP server.
    On Blueyonder here in the UK (my ISP), you can send via their SMTP server from the iPhone over 3G as long as you authenticate to it. I setup my Mac mail to authenticate on outbound email sent via smtp.blueyonder.co.uk and it works fine. I then synced the mail settings to my iPhone and it works fine (although a little slow to send).
    Alternatively your cellular provider usually runs their own SMTP server to which you will also have to authenticate, and you can send through it. For the iPhone in the UK O2 are the exclusive provider, and they have the smtp.02.co.uk gateway.

  • "invalid destination address" sending mms

    Whenever I try to send a picture message (or any sort of MMS really), it says "pending" for a few seconds then says "sending" and after a few more seconds it finally says the message failed and a note pops up that says "invalid destination address"
    Normal texts have gone through just fine to Verizon, AT&T, and Sprint users but pictures/sounds will not send at all.
    Help Please!?

    Hi, I'm having a similar issue to the one described above and was wondering if you could offer some suggestions.
    I have a Droid 2 Global...I bought it in August of 2011.  Until yesterday, I had no problems sending MMS (or SMS) messages to any of my contacts.  Then, I started receiving the "invalid destination address" message when trying to send a message to one contact.  This contact is a Verizon Wireless customer, as am I.  Messages to other Verizon and non-Verizon customers go through with no problem.  I called Verizon and performed the *228 update, performed a power cycle (removing the battery, waiting 20 seconds, putting it back in), cleared out all of my text messages, had my friend perform the *228 and power cycle, ensured that there were not any changes made to my account or my friend's account, and it is still not working.  Just to clarify, SMS messages are going through to all contacts.
    Verizon's only suggestion was to factory reset my phone.  I'm not satisfied with that answer.  Do you all have any other suggestions of things I can try?
    Thanks!

  • Getting error "Sender address invalid"

    I've had the phone since release and everything has been working smoothly (and I am happy our area finally got the 3G network!), until I got a new email address.
    I can receive my email fine on the phone, but when I go to reply and hit send, it tells me "Sender Address Invalid."
    Does anyone know how to resolve this? Or because of my domain name, which is a Qwest email address (ends in @q.com) does Apple not like this?
    Any help would be great. Thanks!

    My 3G started this "invalid" stuff over Christmas. Thanks for the comments on how to fix. FYI, I had to take an extra step because my email address is [email protected]
    The delete restart account did not work...I tried several times. Then I entered my email address as [email protected] It still didn't work, but put me into what looked like the old iPhone pop3 setup screen. I then changed the two [email protected] addresses to [email protected] and it works fine.

  • Trying to set up a group email "RAM" that will contain multiple email addresses.  Receive error messages "check SMTP settings" or "Invalid email address" when I try to send a message to the group.

    I am trying to set up the group email "RAM" that will contain multiple email addresses.  I have inputted the name "RAM" as a corporation.  In the section labeled "Email" I have inputed multiple email addreses so that when I want to send an email to the group "RAM" I just have to input the name "RAM" in the section labeled "To" , input the Subject in the Subject box & the email will be sent to the multiple addresses, yet when I do I receive either one of two error messages being "Invalid Email Address" or "Check SMTP settings" each of which allows me the option of with cancelling the email or send it anyway.

    Bump. I'd like to know, too. I even have some synched Groups from my Apple Address Book I email to using Apple Mail on the Powerbook, but I can't see how to do a group mailing on the Touch either.
    In normal Mail, I just start typing the name of the group, and it autocompletes, I hit return, and it fills in all addresses in the Group.

  • Sender Address Invalid

    New Iphone 3G bought this week.
    Set it up with my Cablevision acount ([email protected]).
    I can receive and read e-mails on the phone no problem whatsoever.
    When I go to send them, I get a "Sender Address Invalid" option and then they just remain in the outbox.
    Any ideas? I know there's the disclaimer that Cablevision mail only works with certain connectivity (edge? 3G? Not sure).
    Any advice or tips?

    haha, yeah!! WHAT is is the answer. This is the exact issue I have!

  • Cannot send e-mail - "The sender address invalid" error message

    Today I keep getting this error message "The sender address is invalid - when i try to send e-mail. I checked my settings and they are the same as always - my e-mail address hasn't changed; the outgoing and incoming server information is the same. I went through the Troubleshooting steps and still nothing. Also it's taking a really long time to connect to check for incoming e-mails. Any clues on why this is happening or what I should try next? The e-mail is via Roadrunner does that matter (althoug it didn't a couple of days ago)

    This message means that your outgoing email server is not letting you connect to send email. Maybe RR changed their policy. You should be able to send using home WiFi, but when using 3G RR will not allow connections from outside their network.
    One easy way around this, is to use the built-in AT&T SMTP server for outgoing email.
    Or, check the RR FAQs and see if they allow an authenticated account to send email - maybe you just need to add SSL and username/pwd on the RR outgoing email server settings.
    BTW - this is asked almost daily - the "Search Discussions" box to your right would have given you many hits with the same answer.

  • Sending failed because of invalid destination addresses - URGENT

    Hello all,
    I have to send an e-mail with a lot of users in BCC.
    The e-mail is not sent because some addresses are not valid and i get the following message : SMTPTransport: Sending failed because of invalid destination addresses.
    I supposed that even if some addresses are not valid the mail would be sent to the others.
    Is there anyway to send the e-mail only to the valid addresses ?
    Cheers.
    Stefano

    Have you tried adding this bit of code to your program?
    Properties props = System.getProperties();
    props.put("mail.smtp.sendpartial","true");
    If you set send partial to true, it should send emails to the valid addresses
    Good Luck,
    A

  • IPhone 3G cannot send mail - Sender address invalid

    I can receive email but cannot send it. The error message is "CANNOT SEND MAIL the sender address was invalid". I have turned off Wi-Fi and as well as SSL. Does anyone know a fix?

    Was it working before?
    Verify that the ISP you are using is not blocking SMTP port 25. If so, try switching your Outgoing SMTP server to cwmx.com (AT&T SMTP server). This option will only send mail over 3G or EDGE.
    Check out this article for some suggestions as well: http://support.apple.com/kb/TS1426

  • IPhone 3G Cannot Send Mail.  The sender address was invalid.

    All of a sudden, I cannot send mail. I get the message "Cannot Send Mail" The sender address was invalid.
    I have reset the phone in hopes of resolving the problem. That did not work.
    The mail that I'm sending to IS a valid address; I'm trying to RESPOND.
    Please help.

    The configuration and use of any outgoing server address (SMTP) may not be supported due to several factors including, but not limited to, the inability for the outgoing server (SMTP) to authenticate users (whether by IP or username/password) that are not directly connected to that Internet Service Providers(ISPs) network.
    This is usually your HOME wi-fi and you are not connected to it because you are on your iPhone away from the house. This is mainly done to prevent unsolicited users from sending SPAM via the ISP's servers.
    An alternative is to use ATT SMTP Server (for US) when you are on the 3G or data network for the carrier and not on your home wi-fi. So enable ATT SMTP server under Other SMTP servers under your Mail's account settings on the iPhone.
    If you are interested you can obtain that information directly from the email provider. This article has a great temple that you can use to ask all necessary information from the provider including "If you use your ISP’s own email service (instead of a third-party such as Gmail), sometimes it may not work if you use another Internet access point, such as a cafe with wireless Internet. Ask your email provider if the settings they give you will work on other networks."
    What to ask if you're having issues sending, receiving, or configuring Mail
    http://support.apple.com/kb/HT1277

Maybe you are looking for

  • CAN I PASS A TABLE NAME AS A VARIABLE IN THE FROM CLAUSE?

    For some reason, I am trying to use a variable name containing the actual table name in the from clause and it won't allow me. I keep getting the error saying I need to declare the variable I'm using eventhough I've used it in another statement that

  • How to create a blank theme with no embedded textures?

    Hi, I have created a custom theme based on the "White" theme thinking that it was truly blank. But when I save my new theme, I see that it weighs a hefty 11Mb. After looking in the package contents, I see that there are marble textures remaining from

  • IDOC  segment problem !

    Can we have feilds from different tables in one segment ? Or a segment must have the fields from one particular  table only ?

  • Unnecessary  Namespace declarations

    Hi, When mapping (graphic) to an externally defined XML schema where some elements belong to different namespaces I get namespace declarations on each element in the resulting XML instance even though they refer to the same ns name. The problem is th

  • About commitments on PM (Maintenance) orders and on internal orders

    Hello All, We have activated commitment mgt for PM orders. We are able to see commitments (PR/PO costs) against PM order. However my client wants, if PM order account assignment is internal order or cost center. The same commitments should appear on