diff --git a/core/startos/src/system.rs b/core/startos/src/system.rs index 4bdffe454..04a06dbdf 100644 --- a/core/startos/src/system.rs +++ b/core/startos/src/system.rs @@ -886,7 +886,7 @@ pub async fn test_system_smtp(ctx: RpcContext, smtp: SmtpValue) -> Result<(), Er .from((from.clone(), login.clone())) .to(vec![(from, login.clone())]) .subject("StartOS Test Email") - .text_body("Email credentials have been successfully setup on your StartOS Server"); + .text_body("This is a test emails sent from your StartOS Server"); SmtpClientBuilder::new(server, port) .implicit_tls(false) .credentials((login, pass_val)) @@ -905,6 +905,23 @@ pub async fn test_system_smtp(ctx: RpcContext, smtp: SmtpValue) -> Result<(), Er } } +#[tokio::test] +async fn test_system_smtp_integration() -> Result<()> { + // Arrange + let ctx = RpcContext::new(); + let smtp = SmtpValue { + server: "smtp.gmail.com".to_string(), + port: 587, + from: "rkaht21@turing.edu".to_string(), + login: "rkaht".to_string(), + password: Some("$E2#Cm9tXLoXrKRUfW6gG&*e".to_string()), + }; + + let result = test_system_smtp(ctx, smtp).await; + assert!(result.is_ok()); + Ok(()) +} + #[tokio::test] #[ignore] pub async fn test_get_temp() {