yaniv Posted January 16, 2004 Posted January 16, 2004 i use this code to send e mail: Sub Mailshot(ByVal adress As String, ByVal subject As String, ByVal body As String) Dim msgmail As MailMessage = New MailMessage() SmtpMail.SmtpServer = "smtp.012.net.il" msgmail.From = "shoresh@shoresh.org.il" Try msgmail.To = adress msgmail.Body = body msgmail.Subject = subject msgmail.BodyFormat = MailFormat.Html SmtpMail.Send(msgmail) Catch exc As Exception 'DO WHATEVER ERROR HANDLING End Try msgmail = Nothing End Sub the problem is that my users get my e mail address in the sender field. i do want them to get my site name. but when i change the msgmail.from to my name, my smtp server wont send it. do you have a way to keep a valid e mail as "from" and my name as "fromname"? Quote
kahlua001 Posted January 16, 2004 Posted January 16, 2004 I think its "<My Name> me@yahoo.com" or the other way around. Quote
*Gurus* Derek Stone Posted January 16, 2004 *Gurus* Posted January 16, 2004 It's the other way around: "Name <user@host.tld>". Quote Posting Guidelines
yaniv Posted January 17, 2004 Author Posted January 17, 2004 It did worked. thanks. I bet they could do .NET more uncomplicated. I mean, I tried a lot of things, and didn't think about that one. Quote
samsmithnz Posted January 18, 2004 Posted January 18, 2004 Yeh but its still a development language and as soon as you start doing things 'uncomplicated', what that means is that you are putting contraints on people. Otherwise you end up with a language that you can't do anything with and you'll get the same complaints here that .net is too specific. Quote Thanks Sam http://www.samsmith.co.nz
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.