cancel
Showing results for 
Search instead for 
Did you mean: 

How to send e-mail and take the IP of client.

Former Member
0 Kudos

Hi to all,

I have two problem,

first one

is sending e-mail from bsp pages. I have to send forgotten passwords to web users via bsp pages. I searched functions but I couldn't find.

second problem

is, I have to take the IP of clients, how can I do this.

I can do all these things with pure asp easily, I think BSP is little bit difficult.

Best Regards,

Hasan Genç

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

For Your First Problem You can Use this FM for Sending Mail from BSP Page....

<b>SO_NEW_DOCUMENT_SEND_API1</b>

For this you need to do various settings...Just chk out this weblog....

/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface

For Your Second Problem...

Check out this link...

I think it will solve your problem....

Cheers:)

Mithlesh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Do you really want to use the function module SO_NEW_DOCUMENT_SEND_API1? It is a farily old API and although it is still supported - you have to figure that it will be put out to pasture some day. Anyway function modules are so "Last Millenium"

I feel that it is better to make the jump to OO and use the CL_BCS (Business Communication Service) classes instead.

Answers (4)

Answers (4)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>I can do all these things with pure asp easily, I think BSP is little bit difficult.

I usually feel the exact same way when I am working in ASP - that it should would be simplier to work in BSP. It is all a matter of what you are already familiar with.

Former Member
0 Kudos

<u><b>IP of Client</b></u>

The IP address should be a request header field.

You can use request->get_header_field with a name of ~remote_addr. Or if you want to see all the header fields call request->get_header_fields.

Regards

CSM Reddy

Former Member
0 Kudos

Hai,

check out this example for retriving header fields.


<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
  <htmlb:page title="test " >
    <htmlb:form>
      <table>
      <%
  data : fields type TIHTTPNVP.
  data: field type IHTTPNVP.
  call method request->get_header_fields changing fields = fields.
  loop at fields into field.
      %>
      <tr><td>
      <%= field-name %></td><td><%= field-value %></td></tr>
      <%
  endloop.
      %>
      </table>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>

and to retrive a single field.


  val = request->get_header_field( name = '~remote_addr' ).

Best Regards,

venkat

Former Member
0 Kudos

Hi,

I got a answer for your first problem. Try this code.

<a href="mailto:?Subject= &Body= This Email"> <font face="verdana" > email </font></a>

</td>

Regards

CSM Reddy