Evo Voice

<back to all web services

SendTestEmail

Send a test email from the specified account

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
POST/settings/test-email
import 'package:servicestack/servicestack.dart';

class EmailAccount implements IConvertible
{
    String? id;
    String? server;
    String? userName;
    int? port;
    String? emailAddress;
    String? displayName;
    String? password;

    EmailAccount({this.id,this.server,this.userName,this.port,this.emailAddress,this.displayName,this.password});
    EmailAccount.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        server = json['server'];
        userName = json['userName'];
        port = json['port'];
        emailAddress = json['emailAddress'];
        displayName = json['displayName'];
        password = json['password'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'server': server,
        'userName': userName,
        'port': port,
        'emailAddress': emailAddress,
        'displayName': displayName,
        'password': password
    };

    getTypeName() => "EmailAccount";
    TypeContext? context = _ctx;
}

/**
* Send a test email from the specified account
*/
// @Api(Description="Send a test email from the specified account")
class SendTestEmail implements IPost, IConvertible
{
    /**
    * The email account to send from
    */
    // @ApiMember(Description="The email account to send from")
    EmailAccount? account;

    /**
    * The user to send to
    */
    // @ApiMember(Description="The user to send to")
    String? emailAddress;

    SendTestEmail({this.account,this.emailAddress});
    SendTestEmail.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        account = JsonConverters.fromJson(json['account'],'EmailAccount',context!);
        emailAddress = json['emailAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'account': JsonConverters.toJson(account,'EmailAccount',context!),
        'emailAddress': emailAddress
    };

    getTypeName() => "SendTestEmail";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'EmailAccount': TypeInfo(TypeOf.Class, create:() => EmailAccount()),
    'SendTestEmail': TypeInfo(TypeOf.Class, create:() => SendTestEmail()),
});

Dart SendTestEmail DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /settings/test-email HTTP/1.1 
Host: evovoice.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"account":{"id":"String","server":"String","userName":"String","port":0,"emailAddress":"String","displayName":"String","password":"String"},"emailAddress":"String"}