How to implement SMTP Email ping / Telnet connection to a SMTP Server?

Dear all,
i want to implement an advanced email address check where a connection to target smtp server is performed and the reply from the server is read back.
This program should check if the user exists and is accepted by the smtp server.
An alternative/part of the solution could be to perform a TELNET connection to the smtp host and get the output without sending an email.
Has anybody done this before?
Thanks a lot in advance.
Regards,
Adam

Adam,
Check this program.
Cheers,
Thomas.
REPORT ZTMG_TEST LINE-SIZE 132.
* Test SAP FTP functions
DATA: BEGIN OF MTAB_DATA OCCURS 0,
LINE(132) TYPE C,
END OF MTAB_DATA.
DATA: MC_PASSWORD(20) TYPE C,
MI_KEY TYPE I VALUE 26101957,
MI_PWD_LEN TYPE I,
MI_HANDLE TYPE I.
START-OF-SELECTION.
MC_PASSWORD = 'password'.
DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
*-- FTP_CONNECT requires an encrypted password to work
CALL 'AB_RFC_X_SCRAMBLE_STRING'
ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
ID 'DSTLEN' FIELD MI_PWD_LEN.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = 'userid'
PASSWORD = MC_PASSWORD
HOST = 'servername'
RFC_DESTINATION = 'SAPFTP'
IMPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
NOT_CONNECTED = 1
OTHERS = 2.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
HANDLE = MI_HANDLE
COMMAND = 'dir'
TABLES
DATA = MTAB_DATA
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
LOOP AT MTAB_DATA.
WRITE: / MTAB_DATA.
ENDLOOP.
ELSE.
* do some error checking.
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
OTHERS = 1.

Similar Messages

  • BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?

    Hi All.
    I have this request.
    BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?
    We have jobs scheduled on BODS running smoothly and absolutely fine.
    But to check, i am logging into the admin console and check for the jobs status.
    I would like to have an email to be received from BODS after each job is finished.
    It could succuessful. Or it could fail.
    Whatsoever, i wish to receive an email alert as soon as a job is finished.
    Can anyone advise me as to whether this could be made possible.
    And if yes, how this could be done.
    Thanks for your help in advance.
    In BOE CMC / for webi / schedule / we find an option to send email for a job success or a job failure.
    Is there any option similar to that in BODS ?
    Also would like to know :
    how to use the smtp_to or mail_to functions ?
    how to set up the smtp server for this ?
    thanks
    REgards
    indu
    Edited by: Indumathy Narayanan on May 31, 2011 3:47 PM

    Hi.
    Since am new to this BODS. I need some help.
    I already have many jobs which are running absolutely fine.
    And when a job runs, and finishes, am able to see the trace saying
    e.g. :
    Job_abc is completed successfully.
    We got the smtp service activated for our test server.
    and we hae a group email id.
    I have put the details of the smtp server / ip address / and said apply restarted.
    The i created a simple test script as below :
    print (' Before email ' );
    smtp_to('abc@company_name.com', 'Job ' || job_name() ||' on ' || host_name() || ' has FAILED',
    ' the job has failed', 0, 0);
    print('After Email ');
    It does send a email to as per smtp_to whatever email is specified.
    But how to differentiate between a job success
    And a job which has failed.
    I wish to have a mail which says on the subject :
    'Job ' || job_name() ||' on ' || host_name() || ' has completed successfully'
    ==> IF it is a success
    OR
    'Job ' || job_name() ||' on ' || host_name() || ' has failed'
    ==> if it has failed
    How to make the system identify, whether
    to send a success message or a error message whatever
    Could anyone advise.
    thanks
    indu

  • How many users from an application can connect to a SQL server at a time?

    HI,
        I need to know , How many users from an application can connect to a SQL server at a time? Do we have any settings for this in SQL server for limiting the users?

    This is a difficult question, since it is both technical and legal.
    The absolute maximum number of connections is around 32700, but unless your server is very beefy, it will choke long before that. A connection is not a user - an application can have many connections for the same user. Depending on your license
    model, you may be legally limited to a certain number of users, but this number is not enforced technially.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to configure SMTP server for osb 10.3.1

    Hi All,
    Can anyone share information on how to configure SMTP server for osb 10.3.1
    and then how to send an email from osb 10.3.1
    Thanks in Advance!!

    Thanks a lot!!
    I configured the same way. When I am sending email to an account on the same domain as my SMTP server is the sending of email is successful. But its giving error when I am trying to send an emain to an account which is on different domain. It giving error as "Operation has been cancelled"
    Please suggest something.

  • How to get SMTP server name and SMTP port

    hi
    i need to send a report to the use to his mail id
    while configuring the ibot in mail tab it is asking for SMTP server ,and SMTP port
    how we can get these two,.... ?:(
    do i have to purchase from vendors, can any one please tell me the process
    really i don;t knw, please help me out
    Thanks in advance

    Hi,
    To configure the Mail Server u need to have SMTP server details, which your using as the mail server,either from vendor side or u can use your's domain.For your info iam pasting the Gmail Smtp server details here,
    Incoming Mail (POP3) Server - requires SSL:      pop.gmail.com
    Use SSL: Yes
    Port: 995
    Outgoing Mail (SMTP) Server - requires TLS or SSL:      smtp.gmail.com (use authentication)
    Use Authentication: Yes
    Port for TLS/STARTTLS: 587
    Port for SSL: 465
    Account Name:      your full email address (including @gmail.com or @your_domain.com)
    Email Address:      your email address ([email protected] or username@your_domain.com)
    Password:      your Gmail password
    Thanks,
    Kumar.

  • How to configure SMTP server in OSB eclipse platform

    how to configure the SMTP server in OSB eclipse platform......
    secondly.................the output email shud contain message sent and not the overview of the mail how do i do it

    How to configure the server? That depends on what server it is. If you are the administrator I would suggest finding the help file for the server and searching for the term "relaying". However I hope you are not, and can ask the real administrator.

  • How to Delete SMTP Server on iPhone/Can't Add Additional Servers

    How do you delete the primary SMTP server. I'm on 2.2.1 My outgoing mail is not working and I figured since I'm a Mobile Me user I'll change the SMTP setting on the iPhone.
    I can't add a new smtp server. I go into account info for my Mobile Me and select SMTP. I can't see how to delete the primary server and when I try to add server I enter smtp.mac.com then my user name and password. I see 3 check marks after I press Save. I says it verified. But it never shows up on the list. I have secondary server but I can't figure out how to delete that one. Its the ATT smtp server cwmx. All that info is ghosted yet it's not on my desktop account.
    If synced Mobile Me but nothing changes.
    Confused and I can't find any help on Apples website.

    I have the same problem.
    Not sure, but I think the iPhone won't let you modify certain email settings of accounts created by syncing to your laptop or PC.
    Delete the account on your iPhone and create it again manually (on the phone itself.)
    This worked for me.

  • N8 Email - Unable to connect to mail service serve...

    I have my Nokia N8 for a good few months. Email stop sync-ing so deleted my 1 and only email account (Hotmail) and now I can not get any email back.
    I have played with internet settings, rebooted my phone but still nothing.
    Basically, this is what happens:
    Got to set up email
    Some text comes up about what mail can do and you have the option of start of exit
    Press start, and it says preparing for set up, then it comes up with Unable to connect to mail service server. try again later.
    The next options I have are to enter email and password or cancel.
    If I enter email and password it comes up with an option to click on mail for exchange and I have to start entering user name, domain, etc or I can exit.
    So, can anyone help me restore the email function. When I got the phone you had an option of hotmail, yahoo, etc etc. And that is what I want back.
    Also I should mention, I don't have any options around pushing or pulling email as it never gets that far into setting up email.
    I live in the UK, so was wondering if I should just take it into my local carphone warehouse who deal with Nokia support and demand it gets repaired? It's part of what I paid for so they should repair/replace for me?
    Any advice would be good,
    Thanks
    Vicki
    Solved!
    Go to Solution.

    For the answer of both how and why please refer to the post by Abi99 earlier this week:
    http://discussions.nokia.com/t5/Symbian-Devices/qu​ot-Unable-to-connect-to-mail-service-server-quot-o​...
    Please click the star below that post to draw attention to the expired Nokia certificate, which Microsoft Mobile Oy must renew to solve the problem! - Also use the false username and false password trick, if it is a first time mail setup on a freshly reset Symbian phone, to avoid any Nokia Messaging clutter, and then input server details manually.
    EDIT: The expired certificate was renewed is now valid until 2015-07-10
    Hans

  • OSX 10.8 server Set VPN server in Local net, How to restrict the Local some IP connect to the VPN server?(noob,so need clearly)

    the tittle is my question. I am noob , so I hope i can make my question clear. Now i 'd like to tell you more about my question:
    My aim is to set a VPN server in Local lan, then ppl can connect to the VPN server, But I dont wanna all of the Local lan IP cant connet to it. So I neet to set a rule to restrick some local Ip to connect failure, just like banning so IP in a rule.such as: just like the "192.168.4.3~192.168.4.20 ; 192.168.7.3~192.168.7.20 " IPs can connect . the IPs which outside the rules can not do.
    my step is following:
    1) install server app
    2)and then i set a VPN server , finally the VPN server can be connected successfully by local lan computer(PC or Mac)
    3)But i found no restrict IP founction in Server app panel.
    4)then i down load workgroup manager, and found nothing there about such a founction about IP restriction.
    so can you tell me how to aproach my aim?
    Please tell me in a clear detail,I am noob
    thank you

    Won't the password restrict everyone from connecting unless they know the password?
    I have never worked with a VPN server, so I can't really add any suggestions. Below are links to Apple support articles, but I'm not sure they will help you:
    VPN - Set up Connection
    VPN - Advanced Setup 
    VPN - Connect
    VPN - Connect Automatically

  • How to setup SMTP server  in PC so as to send mails using JavaMail

    Hi,
    From forums i got it cleared that we can use JavaMail to send emails. I also got two sample codes about getting it done. But in the code its asks address of the host of SMTP server. I dont have any SMTP server. But i am writing a Library Application in which an email must be sent to users automatically when thier books are in overdue.
    Where can i get SMTP server to be installed on my PC so that i can use it send mails through Javamail API.
    Thanks

    Isnt there any way setup SMTP server on own pc?? I just want to send mails in my local area network.

  • How to find SMTP server name on AIX 5.3 ?

    Hi All/Guru
    how can i find SMTP Server name on my aix server which i need to configure E-mail notification for database alerts.
    Thanks in advance.
    Tina

    Check in the file /etc/sendmail.cf

  • How to implement support packages with BW connected to R/3??

    Hello!
    We use a BW system togehther with our ECC6. So we have activated Datasources in LBWE.
    Every time, when I import a support package, there is a warning regardin LBWE an data to process.
    Our workaround is to stop the updater in sm13, empty the queues and start the support packages.
    The problem is: The updater is needed for the supportpackage too, so we have to activate it again...
    Has anyone a "best practise" for this scenario???
    Thanks
    Juergen

    Hi Dirk!
    Thanks for the notes, yes, I know them...
    Fine theorie...
    The problem is:
    Note that this processing must take place during system downtime because otherwise the different objects will be immediately filled with data again.
    We are working worldwide and we have no real downtime, if the system is running...
    So, we used the way to stop the updater to be shure to get no new objects...
    Juergen

  • How do I setup Flash Builder To Connect To A Remote Server ?

    Hi All  ...
    Ok i'm  coming back to Flex after a time away and have  Flex installed in  Eclipse on a Linux Box.  I have just setup a Lamp  Server running in a  VirtualBox that i am using as my development server
    My question  is how do i setup my  project so the Server Location is pointing to my  remote development server instead of having to have apache installed  locally ?
    Many   Thanks 

    David
    What type of manual work? Should I be developing with local running mysql/php and then when I want to test WAN functionality just change the connection variables in my flex/air application to the wan php gateway?
    Can I do flex/air applications using LAMP/WAMP without AMFPHP installed on the server side? I assume AMFPHP would be doing the same function as the Zend framework?

  • How can I send email from iPad using someone else's server

    I use the Netspace server but I'm visitng a friend and using her optusnet server for the Internet, however I am unable to send email, even though I can receive it

    Critters222-
    I assume Netspace is your Internet provider.  They may have their mail server set up to only work when you are accessing the server locally from their domain.  I suggest you contact Netspace and ask them what you need to do to send E-Mail to them from other domains.
    Have you been able to send E-Mail from other places?  If so, there might be a firewall problem in Optusnet.  In that case, they may be best able to advise you. 
    Fred
    Message was edited by: Fred*M.

  • How to implement a singleton class across apps in a managed server}

    Hi ,
    I tried implementing a singleton class , and then invoking the same in a filter class.
    Both are then deployed as a web app (war file) in a managed server.
    I created a similar app , deployed the same as another app in the same managed server .
    I have a logger running which logs the singleton instances as well.
    But am getting two instances of the singleton class in the two apps - not the same .
    I was under the impression that , a singleton is loaded in the class loader level , and since all apps under the same managed server used the same JVM , singleton will only get initialized once.
    Am i missing something here ? or did i implement it wrong..?
    public class Test
       private static Test ref ;
       private DataSource X; 
       static int Y;
       long Z ;  
       private Test ()
          // Singleton
           Z= 100 ;
       public static synchronized Test getinstance()  throws NamingException, SQLException
          if(ref == null)
             ref = new Test() ;        
             InitialContext ic = new InitialContext();
             ref.X = (DataSource)ic.lookup ("jdbc/Views");
          return ref ;       
       public Object clone()throws CloneNotSupportedException
           throw new CloneNotSupportedException();
       public int sampleMethod (int X) throws SQLException
    public final class Filter implements Filter
         public void doFilter(ServletRequest request, ServletResponse response,FilterChain chain) throws IOException, ServletException
              try
                   Test ref = Test.getinstance();
                   log.logNow(ref.toString());
    }Edited by: Tom on Dec 8, 2010 2:45 PM
    Edited by: Tom on Dec 8, 2010 2:46 PM

    Tom wrote:
    Hi ,
    I tried implementing a singleton class , and then invoking the same in a filter class.
    Both are then deployed as a web app (war file) in a managed server.
    I created a similar app , deployed the same as another app in the same managed server .
    I have a logger running which logs the singleton instances as well.
    But am getting two instances of the singleton class in the two apps - not the same .Two apps = two instances.
    Basically by definition.
    >
    I was under the impression that , a singleton is loaded in the class loader level , and since all apps under the same managed server used the same JVM , singleton will only get initialized once. A class is loaded by a class loader.
    Any class loader that loads a class, by definition loads the class.
    A VM can have many class loaders. And far as I know every JEE server in existance that anyone uses, uses class loaders.
    And finally there might be a problem with the architecture/design of a JEE system which has two applications but which is trying to solve it with a singleton. That suggests a there might be concept problem with understanding what an "app" is in the first place.

Maybe you are looking for

  • How to create automatically PDF with Adobe OLE/Automation without pop-up?

    Hi, I developped an application (langage Windev) which extract datas from  PDF documents and split them in many PDF documents. I use Adobe Arcobat Pro (version 10.1.8). I call the method "save" from the object AcroExch.PDDoc and  the method "close" f

  • IOS 8 photo app

    How to get the IOS 7 camera and icloud albums configuration on IOS 8 photo app?

  • Preview issues with some PDF

    Hi, i have occasionally problems using preview to display PDFs. For example this one: http://www.ldc.upenn.edu/acl/W/W03/W03-1604.pdf In preview the documents content is mostly destroyed, yet some figures survived. Of course, my first tough was that

  • How to change the icon of the jar file w/o changing the windows setting

    I may be in wrong forum/area but I am not sure. I have created a windows executable jar file. Functionally it works fine. I can double click it to start my app. I want to change the icon of the jar file. I know I can change the icon for .jar extensio

  • Going in to Sleep randomly?

    I just unplugged my macbook pro and turn Airport on to get Wireless (since I turned it off because I was using ethernet and my schools network sometimes gets confused between ethernet and wireless) and my laptop went into sleep randomly. I assumed it