1. Clarence Chamorro
  2. PowerServer Mobile (Obsolete)
  3. Tuesday, 16 April 2019 00:30 AM UTC

I want a Mobile App to generate a PDF File and used the email account of the device to send an email. I will like to provide the email address, Subject, body text and the PDF Attachment. (I know how to do it in a Window the SMTP email But I guest Mobile and PowerServer is a little different, may be I am wrong)

Could you please give me an advice how to accomplish that.  

Regards,

Clarence.

Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 16 April 2019 00:43 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

Hi Clarence

Pease use function aws.of_sendmail to send mail with attachment on Mobile.
https://www.appeon.com/support/documents/appeon_online_help/ps2019/workarounds_and_api_guide/ch01s04s02.html#ofsendmail_function

The script below work well on both Android and iOS with PowreServer on our end. please give try.

string ls_recipient[]
string ls_attachmentfile[]
string ls_cc[]
string ls_bcc[]
string ls_filename
int li_ret, li_re
eon_mobile_str_mailcontent lstr_content
eon_mobile_awsex lnv_aws

lnv_aws = create eon_mobile_awsex

lstr_content.s_subject = 'test'
lstr_content.s_notetext = 'mytest'
//ls_cc[1] = sle_2.text
ls_recipient[1] ='kai.zhao@appeon.com'

ls_filename = 'preview.pdf'
li_ret = dw_1.SaveAs(ls_filename,PDF!,true)
if li_ret = -1 then
messagebox("AVISO" , "ERROR PDF")
else
messagebox("AVISO" , "OK PDF")
ls_attachmentfile[1] = appeongetcachedir()+"/plugin/"+ ls_filename
END IF

li_re = lnv_aws.of_sendmail(lstr_content,ls_recipient,ls_cc,ls_bcc,ls_attachmentfile)

destroy lnv_aws

Regards,
ZhaoKai

Comment
  1. Clarence Chamorro
  2. Tuesday, 16 April 2019 19:29 PM UTC
Dr ZhaoKai Thank you very much. It work perfect.



By any chance do you know what is the carriage return value or enter key value to format the Text for the body email.



Regards,



Clarence
  1. Helpful
  1. Kai Zhao @Appeon
  2. Wednesday, 17 April 2019 07:11 AM UTC
Hi Clarence,



Please try '~r~n'.



Regards,

ZhaoKai
  1. Helpful
  1. David Peace (Powersoft)
  2. Wednesday, 17 April 2019 15:58 PM UTC
If the email format is HTML, then you will need to embed HTML tags for
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.