Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

email hyperlink

Former Member
0 Kudos

Hi! I'm not sure if this was asked before but I tried searching and I didn't find any.

Anyway, my requirement is to have a hyperlink for the email address in the email that is being sent. My problem is that the email does not seem to recognize the html codes as it does not display the phrase as a link.

LOOP AT l_st_itab.                                        
*  Email sent via B2B Gateway must be in HTML format       
    IF l_st_itab-tdline CS 'http'.  
*  in here, l_st_itab-tdline is a url                        
      CONCATENATE '<a href="' l_st_itab-tdline '">'         
                   l_st_itab-tdline '</a>'                  
                   INTO l_st_itab-tdline.                   
    ENDIF.                                                  

    If l_st_itab-tdline CS c_unsub.           
*  l_unsubmail is an email address, c_unsub = 'click to unsubscribe'.              
      CONCATENATE '<a href="mailto:' l_unsubmail '">'       
                  l_st_itab-tdline '</a>'                   
                  INTO l_st_itab-tdline.                    
    ENDIF.                                                  

    IF l_st_itab-tdformat EQ '*'                            
    OR l_st_itab-tdformat EQ '/'.                           
*     Line break                                           
      CONCATENATE l_string '<br/>' l_st_itab-tdline         
        INTO l_string.                                      
    ELSE.                                                  
      CONCATENATE l_string l_st_itab-tdline INTO l_string.  
    ENDIF.                                                  

  ENDLOOP.      
                                            
  CALL FUNCTION 'SCMS_STRING_TO_XSTRING'                   
      EXPORTING                                            
          text    = l_string                                
      IMPORTING                                             
          buffer  = l_xstring.                              

  CALL FUNCTION 'SSFC_BASE64_ENCODE'                        
      EXPORTING                                             
          bindata        = l_xstring                       
      IMPORTING                                             
          b64data        = g_b64data                        
      EXCEPTIONS                                            
          OTHERS         = 1.                               

1 REPLY 1

Former Member
0 Kudos

anyone?

by the way, email contents are in a standard text.