API reference
GDSMTPDataWriter
Write an SMTP DATA body in order and receive the server's final response on close.
Methods
write(data: PackedByteArray) -> int, Errwrite_async(data: PackedByteArray) -> await int, Errclose() -> Variant, Errclose_async() -> await Variant, Err
write
write(data: PackedByteArray) -> int, ErrForward one DATA operation while retaining its script transaction.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
int, Err
Suspends only the calling routine until the operation completes. No explicit await is needed.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
write_async
write_async(data: PackedByteArray) -> await int, ErrForward one DATA operation while retaining its script transaction.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | PackedByteArray | Required | Input data in the representation shown by the parameter type. |
Return value
await int, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
close
close() -> Variant, ErrRequest the final SMTP DATA response.
Parameters
No parameters.
Return value
Variant, Err
Suspends only the calling routine until the operation completes. No explicit await is needed.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.
close_async
close_async() -> await Variant, ErrRequest the final SMTP DATA response.
Parameters
No parameters.
Return value
await Variant, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
Errors
The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.