Sending Email from C# Windows Form, Several Effort hasn't yielded any effort
BlazeBin - tqybhjdmlnlw
A tool for sharing your source code with the world!
12 Replies
What language is this...?
Also can you please send your code and not an rtf file
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/Try reviewing this it might help. https://phppot.com/php/send-email-localhost-php/
Phppot
Send Email from Localhost using PHP with SMTP and PHPMailer - Phppot
A PHP email script to send emails from the localhost server by using PHPMailer with SMTP.
Thank You for your response, But I think you miss assimilate the info, I am using windows form, i wish to communicate with the PHP file directly from my windows form
Got it, but your code file said otherwise.
C# (Windows Form) I just did share the code, click on the link to have access to the code please
BlazeBin - tqybhjdmlnlw
A tool for sharing your source code with the world!
BlazeBin - tqybhjdmlnlw
A tool for sharing your source code with the world!
@MainaJauro what does PHP have to do with sending email from a windows form?
there are more than adequate tools to send email directly from C# like SmtpClient or MailKit
I tried sending email using windows form, but not working, I guess due to some authentications of SMTP. So I think may be I can make a request to any HttpClient to communicate with my hosted PHP script passing some credentials so it can send the message using localhost. But that seems not working. My goal is just to send email using Windows form without using mail jet, send grid or mail gun
the short answer is you can't send arbitrary emails without using some kind of email sending service
you will be blocked by any mainstream email server you try to send emails to from your own server
in any case, trying to mix languages is never the solution and just makes your code needlessly complicated (and prevents us from being able to help, because this isn't a php server)
If you want to test for development, this is a easy tool to use.
https://www.mailslurp.com/blog/a-guide-to-smtp4dev/
SMTP4Dev Tutorial - how to send emails
SMTP4Dev Tutorial: Test emails effortlessly with this open-source app to improve email quality. Learn when and how to use it plus its limitations now.