Email from BSP
hi ,
I have a requirement that when I click on a button a mail must be send .
I am using MVC and need to use the FM SO_NEW_DOCUMENT_SEND_API1 .
I have created a view with a text area and a button.Its attribute is an instance of a model class that has a string attribute to get the text input.The sender will be manually entered in the method that calls the FM.
My problem is how to declare the variables that has to be passed to the FM.How the message is put into the table.Please dont giver any links as I have already checked previous threads.
Thanks,
Raju.
Refer this link..
Re: Sending An email from BSP
<b>Note:</b> Here is the corrected link what Dezso Pap has posted above:
/people/dezso.pap/blog/2006/03/28/send-mail-fax-with-100-lines-from-a-bsp-application
<i>* Reward each useful answer</i>
Raja T
P.S: Pls close your previous thread..https://www.sdn.sap.com/irj/sdn/profile?userid=3572236
Message was edited by:
Raja Thangamani
Similar Messages
-
Hi All
i need to send an email from BSP application when check box is clicked .
I have the details such as pernr of an employeee by using this i need to retrieve email id of that employee and have to send an email to that employee with some text
1. How to retireve email id of an employee using pernr
2.How to send email from bsp application
ThanksHi ,
<b>To get the Email for the given PERNR:</b>
* Get the Communication detail from Infotype 0105
SELECT
USRID_LONG
FROM PA0105 INTO
RECEIVER_EMAIL
WHERE PERNR = PERNR AND
BEGDA <= SY-DATLO AND
ENDDA >= SY-DATLO AND
SUBTY = '0010'
<b>Look at this code which will send a email from BSP..</b>
DATA:
SEND_REQUEST TYPE REF TO CL_BCS,
DOCUMENT TYPE REF TO CL_DOCUMENT_BCS,
SENDER TYPE REF TO CL_SAPUSER_BCS,
RECIPIENT TYPE REF TO IF_RECIPIENT_BCS,
EXCEPTION_INFO TYPE REF TO IF_OS_EXCEPTION_INFO,
BCS_EXCEPTION TYPE REF TO CX_BCS,
WA_MESSAGE TYPE BAPIRET2.
DATA:
LEN TYPE I,
TEXTLENGTH TYPE SO_OBJ_LEN,
ITAB_MESSAGE TYPE SOLI_TAB,
WA_SOLI TYPE SOLI.
*Load class defnitions
CLASS CL_CAM_ADDRESS_BCS DEFINITION LOAD.
CLASS CL_ABAP_CHAR_UTILITIES DEFINITION LOAD.
* Create persistent send request
TRY.
SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
* Format the message content to be sent into internal table
IF NOT MESSAGE IS INITIAL.
WA_SOLI-LINE = MESSAGE.
APPEND WA_SOLI TO ITAB_MESSAGE.
ELSE.
WA_MESSAGE-MESSAGE = `Enter some Message and then Click "Send Your Message" button.`.
APPEND WA_MESSAGE TO RETURN.
ERROR = 'X'.
RETURN.
ENDIF.
LEN = STRLEN( MESSAGE ).
TEXTLENGTH = LEN.
* Create document
CALL METHOD CL_DOCUMENT_BCS=>CREATE_DOCUMENT
EXPORTING
I_TYPE = 'RAW'
I_SUBJECT = SUBJECT
I_LENGTH = TEXTLENGTH
I_TEXT = ITAB_MESSAGE
RECEIVING
RESULT = DOCUMENT.
* Add document to send request
CALL METHOD SEND_REQUEST->SET_DOCUMENT
EXPORTING
I_DOCUMENT = DOCUMENT.
* Get sender object
CALL METHOD CL_SAPUSER_BCS=>CREATE
EXPORTING
I_USER = SY-UNAME
RECEIVING
RESULT = SENDER.
* Add sender
CALL METHOD SEND_REQUEST->SET_SENDER
EXPORTING
I_SENDER = SENDER.
* Create recipient
CALL METHOD CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS
EXPORTING
I_ADDRESS_STRING = RECEIVER
RECEIVING
RESULT = RECIPIENT.
* Add recipient with its respective attributes to send request
CALL METHOD SEND_REQUEST->ADD_RECIPIENT
EXPORTING
I_RECIPIENT = RECIPIENT
I_EXPRESS = ' '
I_COPY = ' '
I_BLIND_COPY = ' '.
SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
* Send document
CALL METHOD SEND_REQUEST->SEND
RECEIVING
RESULT = SENT.
IF SENT IS NOT INITIAL.
COMMIT WORK.
WA_MESSAGE-MESSAGE = 'Your Message sent Successfully!!!'.
APPEND WA_MESSAGE TO RETURN.
ELSE.
ERROR = 'X'.
WA_MESSAGE-MESSAGE = 'Your Message could not be sent. Please try again later'.
APPEND WA_MESSAGE TO RETURN.
ENDIF.
CATCH CX_ADDRESS_BCS .
CATCH CX_SEND_REQ_BCS.
CATCH CX_DOCUMENT_BCS.
WA_MESSAGE-MESSAGE = 'Your Message could not be sent. Please try again later'.
APPEND WA_MESSAGE TO RETURN.
ERROR = 'X'.
ENDTRY.
Raja T -
Hi,
In my project, I have a task that after clicking a button say "SendEmail", mail has to be sent to the customer.
How can I do this??
Any ideas plz....
Thanks,
Ravindra.Hi ravindra,
first u need to configuration in TX SCOT.
u can check documentation at
http://help.sap.com/saphelp_webas620sp25/helpdata/en/58/97c43af280463ee10000000a114084/
content.htm
next, plz check oss note 455140 for SMTP setup.
so i think the following link will be helpful for u to send mails from BSP.
Sending Emails from a BSP Application
Hope it will help u.
Regards,
Ankur
Message was edited by: Ankur Jain -
Calendar appointments from BSP application
Do you anyone have an idea on how to create Calender appointments from BSP applications?
Any inputs would be helpfull.
SrinivasHello,
calendar items are specially formatted mail items. They do not have textual body, only an attachment with extension
.ics
Here is an example how it should look like:
BEGIN:VCALENDAR
PRODID:-//COMPANY//R/3-640//D
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;ROLE=CHAIR;CN="aaa.bb@ccc.
com":MAILTO:[email protected]
ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE;ROLE=CHAIR;CN=""Sender, aaa"":MAILTO:sender.
[email protected]
ORGANIZER:MAILTO:[email protected]
DTSTART:20060308T090000Z
DTEND:20060308T093000Z
LOCATION:
UID:[email protected]
STATUS:CONFIRMED
DTSTAMP:20060310T122435Z
SUMMARY:test4
CATEGORIES:Keine Terminart ausgewählt
CREATED:20060310T122435Z
SEQUENCE:0
TRANSP:OPAQUE
PRIORITY:5
CLASS:PUBLIC
DESCRIPTION:test 4
END:VEVENT
END:VCALENDAR
I hope it helps you to create your own calendar items.
Regards,
Dezso -
Cannot send email from yahoo account on iPhone 5
I just got an iPhone5 and I couldn't set up my Yahoo email as "yahoo"--it would not allow me to complete the process despot multiple attempts. I had to set it up as an "other" account. I can receive and read emails on my phone, but when I reply those messages will not send. They go to the outbox and an error message pops up that says" the email account has been rejected by the server" Does anyone have advice on either issue: setting up yahoo properly and/or sending email from phone?
outgoing mail server
SMTP - Yahoo! SMTP Server
primary server
Yahoo! SMTP server - ON
server port 465
That's what I have for my yahoo account. -
Cannot send email from non .mac server
I am only able to send/reply emails using my .mac address. My 2 other server addresses keep giving me the following message.
"Cannot send mail. One of the recipient addresses was invalid".
How can I fix this?You should be able to send email from Safari, however I do wonder why you wish to do this and whether there is something inherently wrong with using your mail app and your iCloud address.
-
Cannot send email from MobileMe account
Apple recently pushed out an update to the MobileMe calendar. Since upgrading my account, I am unable to send emails from Firefox4 (current version) in Windows. The page sits indefinitely at a loading screen. Apple Support won't help because it isn't an issue with Safari. Anyone else have this issue?
When using the MobileMe account preset to create the account, the SMTP server is created with 587 as the SMTP server port, which can't be changed when using the MM account preset to create the account.
-
Cannot send email from messages app
Hey everyone
I am unable to send an email from my iPhone to any email address. This feature was working perfectly a couple weeks ago. Once I noticed the issue, I restored my phone and upgraded it to iOS 6.1. This still did not fix the error unfortunately.
Any advice?resolved part one: played around with mail preferences of user two to match prefs in user one
still do not know about access to TDM saved addressbook data. -
Cannot send email from Powershell on Mailbox Role
Hi,
I am trying to send an email from Powershell on Mailbox role of Exchange server. I have installed Symantec Mail Security on Mailbox Role.
When I try to send email using Powershell, I got the following error.
PS C:\a> Send-MailMessage -to [email protected] -Subject "Alert Closed.. Service is restarted on Computer" -from
[email protected] -Body "The service was found stopped on Computer it was started automatically and it is now running normally." -bodyasHTML -priority High -SmtpServer smtp.domain.com
Send-MailMessage : Service not available, closing transmission channel. The server response was: 4.3.2 Service not active
At line:1 char:1
+ Send-MailMessage -to [email protected] -Subject "Alert Closed.. Service is ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
This command is working fine on every server except exchange server (CAS, Mailbox). Firewall is off on the servers.
Any help will be highly appreciated.
Regards,
AneesHi,
Please check the similar thread .
http://social.technet.microsoft.com/Forums/exchange/en-US/ef699832-8da9-4709-9a50-c6223b13bd95/sendmailmessage-returns-the-server-response-was-432-service-not-available?forum=exchangesvrsecuremessaginglegacy
smtp server (smtp.domain.com) is rejecting the connection from the
Mailbox role of Exchange server.
So please allow the mailbox server ip address on the smtp server's (i.e. smtp.domain.com)
receive connector to get it done
Regards
S.Nithyanandham
Thanks S.Nithyanandham -
Cannot send email from my college email account
For some reason, I'm not able to send an email to my professors. I know it's not my account, in general. I'm pretty sure it has to do with the Mac format because I have sent an email from my account on a PC. Does anyone know how I can change my email settings or email format to be able to send an email from my MacBook Pro?
First you have to find out on what PORT the SMTP your "College" is allowing through there firewalls. Then in Mail go to the Mail menu item name "Mail" and in it's drop-down select Preferences. Then click on the account for your "College" email servers. Then in the right-hand pane use the SMTP drop-down to edit the SMTP server settings to the SMTP server port your "college" is allowing through.maybe port 587.
-
Cannot send email from an iPhone to a Outlook group.
Hi,
My question is simple and I'd like an exactly same answer : Can iPhone users send emails from their iPhone's to one or more groups created in Outlook?
This is my situation: our organization is using iPhone to provide email, calendar, contact, task etc. to some of their employees. We are using Airwatch MDM Agent on user's iPhone because we have an Airwatch server in place. I have an user and she has an iPhone 5 and she has created some groups in Outlook but these groups are not reflected in her Contacts in the iPhone. I have update her phone with the latest update, although I was almost sure that this was not the issue, then I've found some interesting posts on internet saying that this was a known problem for the users with the previous iOS but I thought this might has been corrected with the iOS, apparently not.
Also I've tried ''the trick'' that is posted on several forums with the iCloud but neither so it's working. I am looking for a straight answer, if this works or not on iPhone's?
Thanks,
Sebastian.There indeed ARE apps in the app store that will do what you want. Just search and find the one that best fits your needs.
-
Cannot send email from the Mail App?
I've had an izymail subscription for 1 year and just renewed it last week. I could never send an email from my Mail App without a window popping up stating "izymail cannot connect to the server" and the sending bar (along the bottom of the screen) just freezes and will not send.
I've a Hotmail account linked up to izymail. Anyone know how to fix this problem?I fixed my problem - I deleted my email account on my iPhone, then tried to setup a new account. I had a few problems setting it up. It wouldn't recognize the incoming or outgoing servers and I lost my email altogether for a few hours. Then I changed every setting possible and finally figured out that I had 2-3 "Other SMTP Servers" as well as my "Primary Server". Once I deleted the Other SMTP Servers, my email worked and i'm able to send emails now!
I also think changing the "Server Port" number helped solve my problem also, and making sure "Use SSL" was turned off. -
Cannot send email from mac account on iphone
i'm getting error CANNOT SEND MAIL ...the connection to the outgoing sever "smtp.mac.com:myaccount" failed. I'm able to sent email from other email account ie. yahoo, gmail
thx for your help
Message was edited by: gman1023You can try deleting the account on your iphone and setting it up again.
-
Cannot send email from iPhone using Outlook account
I cannot send or reply to emails using my att.net email account. I always get the message, "The sender address was invalid". I can receive emails from this account.
I am having the same problem. Any suggestions would be appreciated!
-
Cannot send email from iPhone5--calendar syncing issues also
I have an iPhone 5 and am not currently using iCloud. I have 3 email accounts.
The first is a yahoo email account--and it both receives & sends emails just fine.
I use Outlook for the other two email accounts (one is an IMAP and the other is a POP). Both receive email, but I cannot send out emails from my iPhone. When I try to send an email from either account, I get this message:
"A copy has been placed in your Outbox. The sender address "[address I used]" was rejected by the server.
Also, I don't know if it is related, but my iPhone calendar isn't syncing with Outlook. I add an appointment on my iPhone or in Outlook, and it won't appear in the other location (Outlook/iPhone).
Thanks for your help.Check your settings, maybe the mail index is at fault.
Setup Wizard and troubleshooting tips:
http://www.apple.com/support/mail
Also has a link to Mail community section.
Maybe you are looking for
-
New iPod touch, no longer able to add songs via iTunes
Have a new iPod touch, less than a week old. 3.1.2 OS and 9.0.2 iTunes on an iMac. Was loading songs manually, walked away for a little while, left the iPod connected, now I cannot add songs. I've restored the iPod, still unable to drop songs onto it
-
Hi.. In OIM the system administrator can change a users password if the user forgets the password as well as the security questions. But the system administrator will know the password of the user until the user changes his password. My requirement i
-
Getting saved ipod stopwatch sessions onto my mac?
I could have sworn that there was a way to sync the stopwatch from the ipod to the desktop or right into itunes but I've searched and can find nothing on this board, google or the ipod manual. was I dreaming this? did apple kill this feature in a ver
-
Hello, after installing oracle database ii saw that there are numerous default users (for example: DMSYS, HR, IX, CTXSYS, WMSYS, XDB, and so on..). if i don't need these users can i delete them? or what's the sense having those users? what they are f
-
I could not find outlook selection in iTunes to sync with my iPhone4.
Hi, I have reinstalled the latest iTunes into my Win7 notebook and updated my iphone4 firmware to iSO 5. However, I could find any option for outlook to sync with. My options are only Google, Window and Yahoo contacts. All my mobile contacts are in m