sa37-00

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sa37-00 [2015/01/09 16:23] – created davidbellsa37-00 [2022/05/04 08:47] (current) Shelley Hunter
Line 1: Line 1:
 ==== Install and Configure EWS (Exchange Web Service) Send Mail ==== ==== Install and Configure EWS (Exchange Web Service) Send Mail ====
  
 +1) Firstly you need to have the following SQL Function in your IQX database:
  
 +<code SQL>
 +
 +ALTER FUNCTION "pears"."EmailProviderDetails"()
 +returns long varchar
 +begin
 +  declare rv long varchar;
 +  declare crlf char(5);
 +  set crlf = "char"(13)+"char"(10);
 +  -- RETURN null;   -- if not using EWS
 +  set rv = 'EWS'+crlf; -- mandatory for EWS
 +set rv = rv + string(rv,(select (select staff.Email  || '; ' from staff where Staff.staffid =  UserStaffID ) || list(number,';' order by pt.name asc) from Phone as p key join PhoneType as pt where p.WhoID = UserStaffID and p.Who = 'U' and pt.Capabilities = 'E'),crlf);  -- one or more sender addresses separated by ;  Use userstaffid to look up valid ones for logged in user.
 +  --    set rv=rv+'IQXEWSSendMail.exe'+crlf;   -- the program to call (with full path if not either in system path or iqx.exe folder). Notepad.exe handy for testing.
 +  set rv = rv+'IQEWSSendMail.exe'+crlf; -- the program to call (with full path if not either in system path or iqx.exe folder). Notepad.exe handy for testing.
 +  
 +  -- All remaining lines are inserted into the <ServerDetails> block.
 +  set rv = rv+'<ExchangeServerUrl>https://pcname.domain.co.uk/EWS/Exchange.asmx</ExchangeServerUrl>'+crlf; -- Example: https://TITANIC.iqx.co.uk/EWS/Exchange.asmx
 +  set rv = rv+'<ExchangeVersion>2010</ExchangeVersion>'+crlf;  -- You need to specify the version of Exchange you are using.
 +  set rv = rv+'<ExchangeServicePack></ExchangeServicePack>'+crlf; -- Add the Exchange Service pack 1 or 2 or 3 etc. blank if none.
 +  return rv
 +end
 +</code>
 +
 +2) Add the following files to your IQX main program folder.
 +
 +          1) IQXEWS.exe
 +          2) Microsoft.Exchange.WebServices.dll
 +          3) IQXEWS.pfx
 +
 +3) Add the following records to your IQX database.
 +
 +Firstly create the record below in the "//phonetype//" table. 
 +
 +<code SQL>
 +INSERT INTO "pears"."phonetype" ("sortorder","company","contact","applicant","phonetypeid","name","Capabilities","AuditFlag","displaygroup","displayname","SocialMediaType") VALUES(999,0,0,0,'UUSE','Email','E',1,0,'EWS Email',NULL)
 +
 +
 +</code>
 +
 +For each email address you want to add you need one of these insert statements.  phoneid is unique and therefore has to change for each record. phonetypeid matches the phonetypeid above. Who is given 'U' so not to mess with any other types. "//number//" becomes the email address to add.
 +<code SQL>
 +INSERT INTO "pears"."phone" ("phoneid","phonetypeid","who","whoid","number","numberdigits") VALUES('XX01251426042013026F','UUSE','U','XX18141218042013016A','EWS@pulse.com',NULL)
 +</code>
 +
 +
 +**Error Reporting**
 +
 +Any error that occurs is written to the *.err file. This file can be found in the same folder as the files above. \\ \\
 +
 +For information on the development of IXQ and the visibility of the Inbox please click [[sa37-01|here]].
 +
 +          
  • sa37-00.1420820636.txt.gz
  • Last modified: 2017/11/16 21:57
  • (external edit)