@@ -104,6 +104,7 @@ function SignYourSelf() {
104
104
const [ extUserId , setExtUserId ] = useState ( "" ) ;
105
105
const [ isCompleted , setIsCompleted ] = useState ( false ) ;
106
106
const [ pdfArrayBuffer , setPdfArrayBuffer ] = useState ( "" ) ;
107
+ const [ activeMailAdapter , setActiveMailAdapter ] = useState ( "" ) ;
107
108
const divRef = useRef ( null ) ;
108
109
const nodeRef = useRef ( null ) ;
109
110
const [ , drop ] = useDrop ( {
@@ -266,7 +267,14 @@ function SignYourSelf() {
266
267
setIsLoading ( loadObj ) ;
267
268
} ) ;
268
269
const contractUsersRes = await contractUsers ( jsonSender . email ) ;
269
- if ( contractUsersRes [ 0 ] && contractUsersRes . length > 0 ) {
270
+ if ( contractUsersRes === "Error: Something went wrong!" ) {
271
+ const loadObj = {
272
+ isLoad : false
273
+ } ;
274
+ setHandleError ( "Error: Something went wrong!" ) ;
275
+ setIsLoading ( loadObj ) ;
276
+ } else if ( contractUsersRes [ 0 ] && contractUsersRes . length > 0 ) {
277
+ setActiveMailAdapter ( contractUsersRes [ 0 ] ?. active_mail_adapter ) ;
270
278
setContractName ( "_Users" ) ;
271
279
setSignerUserId ( contractUsersRes [ 0 ] . objectId ) ;
272
280
const tourstatuss =
@@ -286,12 +294,6 @@ function SignYourSelf() {
286
294
isLoad : false
287
295
} ;
288
296
setIsLoading ( loadObj ) ;
289
- } else if ( contractUsersRes === "Error: Something went wrong!" ) {
290
- const loadObj = {
291
- isLoad : false
292
- } ;
293
- setHandleError ( "Error: Something went wrong!" ) ;
294
- setIsLoading ( loadObj ) ;
295
297
} else if ( contractUsersRes . length === 0 ) {
296
298
const contractContactBook = await contactBook ( jsonSender . objectId ) ;
297
299
if ( contractContactBook && contractContactBook . length > 0 ) {
@@ -615,7 +617,8 @@ function SignYourSelf() {
615
617
let singleSign = {
616
618
pdfFile : base64Url ,
617
619
docId : documentId ,
618
- isCustomCompletionMail : isCustomCompletionMail
620
+ isCustomCompletionMail : isCustomCompletionMail ,
621
+ mailProvider : activeMailAdapter
619
622
} ;
620
623
621
624
await axios
@@ -1138,6 +1141,7 @@ function SignYourSelf() {
1138
1141
sender = { jsonSender }
1139
1142
setIsAlert = { setIsAlert }
1140
1143
extUserId = { extUserId }
1144
+ activeMailAdapter = { activeMailAdapter }
1141
1145
/>
1142
1146
{ /* pdf header which contain funish back button */ }
1143
1147
< Header
0 commit comments