NetTalk Central

Author Topic: Email from Web  (Read 3896 times)

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Email from Web
« on: July 20, 2016, 01:11:00 AM »
Clarion 10
NT 9.11

Have email sending from my web app and all works fine.  Including logging of sent emails.
However it seems slow, can take 4/5 seconds to send - previously used vuMail and it sent in less than a second.
Code below is what sends emails, am I doing correctly please.

Brian.

SendEmailNotice               ROUTINE
  email.pEmailSettingsPath = p_web.site.apppath
  email.pEmailSubject      = 'Transcription for: ' & p_web.GSV('CVF:cvfsysid') & ' ' &p_web.GSV('CVF:PatientName') & ' Customer: ' & p_web.GSV('CVF:CustomerName')
  email.pEmailMessageText  = app:TransEmail & '<13,10>' & '<13,10>' &app:ReturnText & '<13,10>' & '<13,10>' & app:Disclaimer
  email.pEmailTo           = CLIP(p_web.GSV('CVF:AssignedEmail'))
  email.pEmailFrom         = CLIP(p_web.GSV('UserName'))
  email.pEmailReplyTo      = CLIP(p_web.GSV('sta:emailaddress'))     
  email.pStartTLS          = 1
  r# = SendEmail(email)
  DO AddEmailLog
  EXIT

Thanks in advance.
Brian

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Email from Web
« Reply #1 on: July 21, 2016, 06:46:10 AM »
Hi Brian,

The speed it takes to send depends on the server you are talking to, and the bandwidth between you and the server. 4 to 5 seconds is not abnormal.

It is possible to speed things up by sending multiple emails at once, but ISP's often set limits on that, so I don't recommend it.

cheers
Bruce

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Email from Web
« Reply #2 on: July 21, 2016, 10:20:32 AM »
My bandwidth here in France is not great unfortunately, when the update is loaded on the cloud server it should improve.

Thanks.
Brian

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Email from Web
« Reply #3 on: July 26, 2016, 12:53:28 AM »
Hi Brian

Perhaps overkill for your needs as it requires quite a bit of work,
but an alternative is to create the mail in a data file and have a separate process that sends the mail.


One step further then would be that the process that loops through the file sending those mails can start a new process for every mail being sent.
This way you can start 5-10 mail sending child process'



Johan