Is it possible to send an email from SMTP server, for example from do_not_reply@xxxx.xxx.com, without have the server credential (username and password) inside my code?

I tried one code, it works, but it send from my email account. Not from SMTP server.

I also tested several code but I cant proceed to send the email since it need server credential.
And my Symantec popup error like

Symantec email policy:
Your email message was unable to be sent because your mail server rejected the message.
550 5.7.1 Client does not have permissions to send as this sender

can someone help me pls..?

I got this problem solved.
Here is the solution:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

        'create the mail message
        Dim mail As New MailMessage()

        'set the addresses
        mail.From = New MailAddress("xxxx@xxx.com")

        'set the content
        mail.Subject = "Important! Spoilage Exceed!"
        mail.Body = "Please take further action!"

        'set the server
        Dim smtp As New SmtpClient("xxxxx")
        smtp.Port = 25

        Response.Write("Your Email has been sent sucessfully - Thank You")

    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.