|
-
Aug 1st, 2006, 12:59 PM
#1
Thread Starter
Member
[02/03] problem with mail server when attempting to send mail
ye ye its me again!
ok heres the deal, im making a program that sends e-mails, with the code found @ this thread
ok i got the code all runing and working, manually fixed some errors, ask if u want the source.
my problem is that when i send the mail its send from a different e-mail address that it was ment to? xD
it is send from the e-mail adres MS outlock has...
any ideas? plx? 
bibi 
PS: post #50, i promise 2 be better (lol)
Human beings are a disease, a cancer of this planet, you are a plague, and we are the cure.
-
Aug 1st, 2006, 01:19 PM
#2
Frenzied Member
Re: [02/03] problem with mail server when attempting to send mail
Post the code that you are using. Also what email address is it using? For example, is it using the address that you ment to use as the To address, or is it one that you have no idea where it is coming from?
-
Aug 1st, 2006, 01:24 PM
#3
Thread Starter
Member
Re: [02/03] problem with mail server when attempting to send mail
hey m8
VB Code:
'the import:
Imports System.Web.Mail
'here lol
Inherits System.Windows.Forms.Form
' Variable which will send the mail
Private obj As System.Web.Mail.SmtpMail
'Variable to store the attachments
Private Attachment As System.Web.Mail.MailAttachment
'Variable to create the message to send
Private Mailmsg As New System.Web.Mail.MailMessage
'@ the button sub:
Dim Counter As Integer
'Validate the data
If Txtsmtpserver.Text = "" Then
MsgBox("Enter the SMTP server info ...!!!", MsgBoxStyle.Information, "Send Email")
Exit Sub
End If
If txtfromemail.Text = "" Then
MsgBox("Enter your Email address.", MsgBoxStyle.Information, "Send Email")
Exit Sub
End If
If txtto.Text = "" Then
MsgBox("Enter the Recipient's Email address.", MsgBoxStyle.Information, "Send Email")
Exit Sub
End If
If txtsubject.Text = "" Then
MsgBox("Please enter an e-mail subject.", MsgBoxStyle.Information, "Send Email")
Exit Sub
End If
'Set the properties
'Assign the SMTP server
obj.SmtpServer = Txtsmtpserver.Text
'Multiple recepients can be specified using ; as the delimeter
'Address of the recipient
Mailmsg.To = txtto.Text
'Your From Address
'You can also use a custom header Reply-To for a different replyto address
'Mailmsg.From = "\" & txtFromName.Text & "\ <" & txtFromEmail.Text & ">"
'Specify the body format
If chkFormat.Checked = True Then
Mailmsg.BodyFormat = MailFormat.Html 'Send the mail in HTML Format
Else
Mailmsg.BodyFormat = MailFormat.Text
End If
'If you want you can add a reply to header
'custom headersare added like this
'Mailmsg.Headers.Add("Manoj", "TestHeader")
'Mail Subject
Mailmsg.Subject = txtsubject.Text
'Attach the files one by one
For Counter = 0 To lstAttachment.Items.Count - 1
Attachment = New MailAttachment(lstAttachment.Items(Counter))
'Add it to the mail message
Mailmsg.Attachments.Add(Attachment)
Next
'Mail Body
Mailmsg.Body = txtmessage.Text
'Call the send method to send the mail
obj.Send(Mailmsg)
ok it sends the e-mail from the address i send e-mails from outlock, from a site i got.
i mean, when i send an e-mail from outlock, i send it from [email protected]
so when i send an e-mail from the program writing as host ex: mail.tee.gr it still sends it as [email protected] from asbanda.mail.info
thanx
Human beings are a disease, a cancer of this planet, you are a plague, and we are the cure.
-
Aug 1st, 2006, 01:30 PM
#4
Frenzied Member
Re: [02/03] problem with mail server when attempting to send mail
I'm not quite getting what the issue is.
The email is being sent from [email protected].
But you want something different to be displayed in the from property?
If that is correct, you aren't setting the From property of the email. It's commneted out right under where you are setting the To property. So if you uncomment
and set the from address it should appear to be sent from that email address (If I am understandign your issue correctly).
-
Aug 1st, 2006, 01:34 PM
#5
Thread Starter
Member
Re: [02/03] problem with mail server when attempting to send mail
i mean, i set as the host i wanna the e-mail 2 b sent, mail.yahoo.gr, and the from as [email protected]
but it sends an e-mail from mail.asbanda.info, from the e-mail [email protected]
i set a server, but its sent fromm a different server, the one outlock gots to send e-mails
sorry for my english
Human beings are a disease, a cancer of this planet, you are a plague, and we are the cure.
-
Aug 1st, 2006, 01:45 PM
#6
Frenzied Member
Re: [02/03] problem with mail server when attempting to send mail
For one thing you can only send mail using Yahoo if you have their pay account. The free account doesn't supports pop and smtp.
I don't have 02/03 installed on the system I am on, so I can't verify where this is, but if you do have the pay account with yahoo, you have to set the Username and password for that account to be able to send mail to it. In 2005 it's called netcredentials.
-
Aug 1st, 2006, 01:47 PM
#7
Thread Starter
Member
Re: [02/03] problem with mail server when attempting to send mail
well, u may be right, but i used an external e-mail application, and sended an e-mail from mail.yahoo.gr while i have the free account... i dont know a lot for mailstuff, do u think it wasnt usind smtp?
Human beings are a disease, a cancer of this planet, you are a plague, and we are the cure.
-
Aug 1st, 2006, 01:53 PM
#8
Frenzied Member
Re: [02/03] problem with mail server when attempting to send mail
I don't know how they did it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|