Fix Email Code

Encerrado Postado há 6 anos Pago na entrega
Encerrado Pago na entrega

The last coder didn't complete the task I need someone to fix the email code and allow the compressed photo to be in the html email body.

Essentially, I want someone to fix the email code to look professional, formatted, and include photos and videos.

So far 4 "professional" coders haven't been able to help me.

Please read the the job details. This is a job for formatting email in visual basic asp.net. The website uses controls. My goal is to have a professional looking email. The current email is working but the email is not formatted when received.

Private Sub SendAllEmail(ByVal _file As String)

Dim dt As New DataTable()
dt = getData("select email from AspNetUsers where ReceiveEmail=1")
For Each dr As DataRow In dt.Rows
If dr("email").ToString() <> "" Then
SendPostByEmail(dr("email").ToString(), _file)
End If
Next

End Sub

Private Function SendPostByEmail(ByVal emailTo As String, ByVal _file As String) As Boolean

Dim retVal As Boolean = False
Dim client As New RestClient()
client.BaseUrl = New Uri("https://api.mailgun.net/v3")
client.Authenticator = New HttpBasicAuthenticator("api", "key-55b8de2379032d2b48014a95a03e2ccb")
Dim Request As New RestRequest()

Try
Dim configurationFile As Configuration = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath)
Dim mailSettings As MailSettingsSectionGroup = configurationFile.GetSectionGroup("system.net/mailSettings")
Dim port As Integer
Dim host, password, username As String
Dim BodyOfEmail As String

If Not mailSettings Is Nothing Then
port = mailSettings.Smtp.Network.Port
host = mailSettings.Smtp.Network.Host
password = mailSettings.Smtp.Network.Password
username = mailSettings.Smtp.Network.UserName

Dim SmtpServer As SmtpClient = New SmtpClient()
Dim mail As MailMessage = New MailMessage()

BodyOfEmail = "Post: " & Body.Text.ToString().Trim()

If wURL.Text.ToString().Trim() <> "" Then
BodyOfEmail &= "<br/><br/>Story Url: " & wURL.Text.ToString().Trim()
End If

Dim url As String = wYTURL.Text.ToString().Trim()
If url.Contains("youtube.com") Then
Dim ytFormattedUrl As String = GetYouTubeID(url)
BodyOfEmail &= "<br/><br/>Video Url: " & ytFormattedUrl
End If

'If FileUpload1.PostedFile IsNot Nothing Then
' If FileUpload1.HasFile Then
If _file <> "" Then
Dim FileName As String = Path.GetFileName(_file)
'BodyOfEmail = "<html><body>" & BodyOfEmail & "<br/><img src=""cid:PostedImageId"">"
BodyOfEmail = "<html><body>" & BodyOfEmail & "<br/><img src=""cid:" & FileName & """>"
'Dim _attachment As New Attachment(FileUpload1.PostedFile.InputStream, FileName)
'_attachment.ContentId = "PostedImageId"
'mail.Attachments.Add(_attachment)

'Dim altView As AlternateView
'altView = AlternateView.CreateAlternateViewFromString(BodyOfEmail & "<br/><img src=cid:PostedImageId>", Nothing, "text/html")
'Dim yourPictureRes As New LinkedResource(FileUpload1.PostedFile.InputStream, MediaTypeNames.Image.Jpeg)
'yourPictureRes.ContentId = "PostedImageId"
'altView.LinkedResources.Add(yourPictureRes)
'mail.AlternateViews.Add(altView)

Request.AddFile("inline", _file)
End If
' End If
'End If

BodyOfEmail &= "<br/><br/><br/><br/><H1 align=""center"" style=""font-size:120%;""><a href=""http://sfacting.com/Account/Settings"">UnSubscribe</a> </H1>" &
"<H1 align=""center"" style=""font-size:120%;""><a href=""sfacting.com"">SFACTING.COM</a> </H1>" &
"<H1 align=""center"" style=""font-si

ASP.NET Visual Basic

ID do Projeto: #13401524

Sobre o projeto

18 propostas Projeto remoto Ativo em há 6 anos

18 freelancers estão ofertando em média $35 nesse trabalho

azmatakhtar

You can see my profile, can you please share existing code with me . i will make sure you get your desired results

$30 USD em 1 dia
(31 Comentários)
5.6
contact2phpsl

Dear Client- I can fix the email code as have 5+ years of experience in C#, ASP.NET, ASP.NET MVC 3-5, HTML/CSS, SQL, JavaScript, Oracle 12c and AJAX. Kindly share the credentials and provide the images/videos that you Mais

$166 USD em 1 dia
(29 Comentários)
4.9
dineshmore

cannot embed image or video in email need to store image or video on cloud and provide reference. Hi Myself expert in Dot net technologies with 12+yrs of experience in software development. Developed various web a Mais

$30 USD in 3 dias
(22 Comentários)
5.3
AbdulBasitAli045

Dear Hiring Manager, I have gone through your job requirement and I understand that it requires EMail with 100% accuracy.

$10 USD em 1 dia
(28 Comentários)
4.2
bizbeesTeck

Hi , i have 10 year of development experience in asp.net . give me a chance to look and fix the problem. Thanks

$30 USD in 3 dias
(7 Comentários)
3.7
SMARIEN

Hi Software Engineer Here. Having three years of software development experience in asp.net, C#, SQL Server, MVC and Entity Framework. i can fix issues as per your requirements. will provide you quick response and un Mais

$35 USD in 2 dias
(2 Comentários)
0.7
Misujon3

Greetings! Hope you will not ignore my resume/cover letter or proposal letter whatever you mean it. Wish you could have spent some time to read this thoroughly. May be this will help you to get an eminent person or ma Mais

$30 USD em 1 dia
(0 Comentários)
0.0
Tazul2017islam

Hi Dear Client, I will change your Email code. Don’t worry…. I will give you better services than others. Please chance me and contact me invitation. Thank you.

$25 USD em 1 dia
(0 Comentários)
0.0
alug

I have over 10 years of development in C# and ASP.NET. I can do your work within time and can produce quality of work.

$25 USD em 1 dia
(0 Comentários)
0.0
DreamyArslan

Hi, I can fix the email code as per your instructions. If you're interested to check my professional portfolio I'll provide you in inbox. I assure you to complete my job in time, have a good experience.

$15 USD in 0 dias
(0 Comentários)
0.0
gautam07

Hi, I am expert in html email template design and development.I will fix code.I have few questions,please open chat so we can discuss. Thanks Gautam

$35 USD em 1 dia
(0 Comentários)
0.0
tiwariraushan71

Please give us an opportunity to show our expertise in the same. I would like to work with you wid best outputs always. Please initiate chat so that we can discuss more and I can suggest you better. Laravel:3yrs Mais

$15 USD in 0 dias
(0 Comentários)
0.0
jellybean69

Carnival uses Sitecore as a CMS thats Asp.net driven... Many days of editing templates or creating one.

$30 USD em 1 dia
(0 Comentários)
0.0